x264enc: Don't try to fixate ANY allowed caps
authorSebastian Dröge <sebastian@centricular.com>
Fri, 15 Apr 2022 13:53:25 +0000 (16:53 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 16 Apr 2022 00:24:21 +0000 (00:24 +0000)
Instead fall back to the template caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2197>

subprojects/gst-plugins-ugly/ext/x264/gstx264enc.c

index 70f73c5..43765b3 100644 (file)
@@ -2272,6 +2272,11 @@ gst_x264_enc_set_format (GstVideoEncoder * video_enc,
       return FALSE;
     }
 
+    if (gst_caps_is_any (allowed_caps)) {
+      gst_caps_unref (allowed_caps);
+      allowed_caps = gst_caps_ref (template_caps);
+    }
+
     allowed_caps = gst_caps_make_writable (allowed_caps);
     allowed_caps = gst_caps_fixate (allowed_caps);
     s = gst_caps_get_structure (allowed_caps, 0);