va: filter: check if filter is open on set_orientation()
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Thu, 18 Feb 2021 04:58:25 +0000 (05:58 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 20 Feb 2021 17:03:43 +0000 (17:03 +0000)
Because the method requires pipeline_caps is filled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>

sys/va/gstvafilter.c

index 6b666f6391e2542d012ad1b89216e310c479b368..48b32e73ae7b784fa36e3a36528f3cebe3eac946 100644 (file)
@@ -780,6 +780,9 @@ gst_va_filter_set_orientation (GstVaFilter * self,
   guint32 mirror = VA_MIRROR_NONE, rotation = VA_ROTATION_NONE;
   guint32 mirror_flags, rotation_flags;
 
+  if (!gst_va_filter_is_open (self))
+    return FALSE;
+
   if (!_from_video_orientation_method (orientation, &mirror, &rotation))
     return FALSE;