transcodebin: consider 'any' as no restriction
authorGuillaume Desmottes <guillaume.desmottes@collabora.com>
Wed, 26 Feb 2020 03:38:03 +0000 (09:08 +0530)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 26 Feb 2020 13:12:37 +0000 (13:12 +0000)
gstreamer-rs set 'any' as default restriction which actually means 'no
restriction' so handle it as the absence of restriction.

gst/transcode/gsttranscodebin.c

index e69897a..972fd2f 100644 (file)
@@ -296,7 +296,7 @@ make_decodebin (GstTranscodeBin * self)
         GstCaps *restrictions =
             gst_encoding_profile_get_restriction (tmp->data);
 
-        if (!restrictions) {
+        if (!restrictions || gst_caps_is_any (restrictions)) {
           GstCaps *encodecaps = gst_encoding_profile_get_format (tmp->data);
 
           gst_caps_append (decodecaps, encodecaps);