diff options
author | Marc Leeman <m.leeman@televic.com> | 2020-09-01 09:31:33 +0200 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2020-09-09 16:51:54 +0000 |
commit | 629154642f99fad7eb5bb8750979f4a64c10166d (patch) | |
tree | c22cbaf6073e626a762b39b0f6deef05515a10db /gst | |
parent | 0818af088b8418b4d69ed1fa745f6958d13cb9d2 (diff) | |
download | gstreamer-vaapi-629154642f99fad7eb5bb8750979f4a64c10166d.tar.gz |
vaapisink: when updating the caps, reset rotation
When an element upstream changes settings (e.g. crop), new caps are sent
to vaapisink. When vaapisink was rotating the image, it needs to
re-evaluate if the sink needs to rotate the image.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/389>
Diffstat (limited to 'gst')
-rw-r--r-- | gst/vaapi/gstvaapisink.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c index 2d7824e9..e722b713 100644 --- a/gst/vaapi/gstvaapisink.c +++ b/gst/vaapi/gstvaapisink.c @@ -1401,6 +1401,9 @@ gst_vaapisink_set_caps (GstBaseSink * base_sink, GstCaps * caps) update_colorimetry (sink, &GST_VIDEO_INFO_COLORIMETRY (vip)); gst_caps_replace (&sink->caps, caps); + /* Reset the rotation to the default when new caps are coming in. This + * forces re-evaluating if the rotation needs to be done */ + sink->rotation = DEFAULT_ROTATION; gst_vaapisink_ensure_colorbalance (sink); gst_vaapisink_ensure_rotation (sink, FALSE); |