summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrique Ocaña González <eocanha@igalia.com>2023-02-27 18:30:20 +0100
committerEnrique Ocaña González <eocanha@igalia.com>2023-02-27 18:30:20 +0100
commitccb77f72ef08843743d6b42b53ac3e1e875dd7cb (patch)
tree486afbe9a184e0f458b7a5a893414c463abffb78
parent459979648855cb0d67370553b74084529e551a3f (diff)
downloadgstreamer-ccb77f72ef08843743d6b42b53ac3e1e875dd7cb.tar.gz
gsturisourcebin: Don't try to plug a typefinder on dynamic sources.
setup_source() tries to plug a typefind element unconditionally to the source element on non-live streams, no matter if the element is dynamic or not. In the former case, the element might not have any src pad created, so the plugging will fail, triggering an unrecoverable error. This patch only tries the plugging when the element is not dynamic (no new-pad callback has been configured). In case the element is dynamic, the callback will take care of configuration when pads appear in the future. This solves many regressions on the YouTube MSE Conformance Tests[1] at least in downstream WPE 2.38[2] after migrating from GStreamer 1.16 to 1.18, a change that introduces Playbin 3. [1] https://ytlr-cert.appspot.com/latest/main.html [2] https://github.com/WebPlatformForEmbedded/WPEWebKit/tree/wpe-2.38 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4074>
-rw-r--r--subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c b/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c
index 0e8d7e4d63..7d1eb20c3f 100644
--- a/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c
+++ b/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c
@@ -2292,10 +2292,15 @@ setup_source (GstURISourceBin * urisrc)
return TRUE;
} else if (urisrc->is_stream) {
- GST_DEBUG_OBJECT (urisrc, "Setting up streaming");
- /* do the stream things here */
- if (!setup_typefind (urisrc, NULL))
- goto streaming_failed;
+ if (!urisrc->src_np_sig_id) {
+ GST_DEBUG_OBJECT (urisrc, "Setting up streaming");
+ /* do the stream things here */
+ if (!setup_typefind (urisrc, NULL))
+ goto streaming_failed;
+ } else {
+ GST_DEBUG_OBJECT (urisrc, "Not setting up streaming yet, waiting for"
+ " dynamic pads to appear");
+ }
} else {
GstIterator *pads_iter;
gboolean done = FALSE;