summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2020-11-14 09:43:59 +0100
committerTim-Philipp Müller <tim@centricular.com>2020-11-19 22:57:41 +0000
commit54fd51d54b18ef0dde080d9dbdde7cb2acaefdca (patch)
treea59e1095e83fdb061deea32d49e210d75f392904
parent8136792750c6a016f7c330ff598f0b3a88cb75fc (diff)
downloadgstreamer-plugins-base-54fd51d54b18ef0dde080d9dbdde7cb2acaefdca.tar.gz
decodebin3: Properly handle caps query with no filter
There's no guarantee that upstream elements will do queries with specified filter caps. If that's the case, just return GST_CAPS_ANY Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/935>
-rw-r--r--gst/playback/gstdecodebin3-parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/playback/gstdecodebin3-parse.c b/gst/playback/gstdecodebin3-parse.c
index aea0f666d..1c23d0daf 100644
--- a/gst/playback/gstdecodebin3-parse.c
+++ b/gst/playback/gstdecodebin3-parse.c
@@ -145,6 +145,10 @@ get_parser_caps_filter (GstDecodebin3 * dbin, GstCaps * caps)
GList *tmp;
GstCaps *filter_caps = gst_caps_new_empty ();
+ /* If no filter was provided, it can handle anything */
+ if (!caps || gst_caps_is_any (caps))
+ return gst_caps_new_any ();
+
g_mutex_lock (&dbin->factories_lock);
gst_decode_bin_update_factories_list (dbin);
for (tmp = dbin->decoder_factories; tmp; tmp = tmp->next) {