diff --git a/subprojects/gst-integration-testsuites/testsuites/validate.testslist b/subprojects/gst-integration-testsuites/testsuites/validate.testslist index bf5d235c83..f24e1aa763 100644 --- a/subprojects/gst-integration-testsuites/testsuites/validate.testslist +++ b/subprojects/gst-integration-testsuites/testsuites/validate.testslist @@ -943,6 +943,7 @@ validate.test.mp4.qtdemux_reverse_playback_full_gop.reverse_playback_full_gop validate.test.mp4.redirect.play_15s validate.test.nle.urisource.play validate.test.playbin.check_active_stream +validate.test.playbin3.ignore_raw_audio_from_demuxer validate.test.playbin3.sourcebin_check_mixed_static_and_dyanmic_pads validate.test.rtp.h264.payloader_fail_nego_force_profile validate.test.rtp.h264.payloader_nego_profile diff --git a/subprojects/gst-integration-testsuites/testsuites/validate/playbin3/ignore_raw_audio_from_demuxer.validatetest b/subprojects/gst-integration-testsuites/testsuites/validate/playbin3/ignore_raw_audio_from_demuxer.validatetest new file mode 100644 index 0000000000..43e8137f41 --- /dev/null +++ b/subprojects/gst-integration-testsuites/testsuites/validate/playbin3/ignore_raw_audio_from_demuxer.validatetest @@ -0,0 +1,10 @@ +set-globals, media_dir="$(test_dir)/../../../medias/" + +meta, + handles-states=true, + args = { + "uridecodebin3 uri=\"file://$(media_dir)/defaults/mp4/raw_h264.0.mp4\" caps=video/x-raw ! $(videosink) ", + } + +pause +stop diff --git a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3-parse.c b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3-parse.c index d5b0566281..6675aae9d5 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3-parse.c +++ b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3-parse.c @@ -197,6 +197,16 @@ check_parser_caps_filter (GstDecodebin3 * dbin, GstCaps * caps) { GList *tmp; gboolean res = FALSE; + GstCaps *default_raw = gst_static_caps_get (&default_raw_caps); + + if (gst_caps_can_intersect (caps, default_raw)) { + GST_INFO_OBJECT (dbin, "Dealing with raw stream from the demuxer, " + " we can handle them even if we won't expose then"); + gst_caps_unref (default_raw); + + return TRUE; + } + gst_caps_unref (default_raw); g_mutex_lock (&dbin->factories_lock); gst_decode_bin_update_factories_list (dbin); @@ -223,7 +233,7 @@ check_parser_caps_filter (GstDecodebin3 * dbin, GstCaps * caps) } beach: g_mutex_unlock (&dbin->factories_lock); - GST_DEBUG_OBJECT (dbin, "Can intersect : %d", res); + GST_DEBUG_OBJECT (dbin, "Can intersect %" GST_PTR_FORMAT ": %d", caps, res); return res; } @@ -341,9 +351,9 @@ parse_chain_output_probe (GstPad * pad, GstPadProbeInfo * info, GstCaps *prop = NULL; gst_query_parse_accept_caps (q, &prop); /* Fast check against target caps */ - if (gst_caps_can_intersect (prop, input->dbin->caps)) + if (gst_caps_can_intersect (prop, input->dbin->caps)) { gst_query_set_accept_caps_result (q, TRUE); - else { + } else { gboolean accepted = check_parser_caps_filter (input->dbin, prop); /* check against caps filter */ gst_query_set_accept_caps_result (q, accepted);