From 4404e7203c3f6240f53af1aa5f79c901ae7b7453 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Mon, 17 Jul 2023 15:23:35 +0100 Subject: [PATCH] decodebin3: Fix slot input linking when the associated stream has changed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setting the input field on the empty slot prevents future linking of it and will result in flow errors later on. This was observed in WebKit's MediaStream source element, when it changes the caps on one of its associated streams, from an encoded format to a raw video format. The associated stream-id on the sticky stream-start event doesn´t change, but the element creates a new GstStream with a different ID and sets it on the stream-start event. Stream parsing is disabled in urisourcebin, so decodebin3 handles the parsing. Without this patch we would end-up with unlinked pads in decodebin3 after switching to the raw video format. Part-of: --- subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c | 1 - 1 file changed, 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c index c9eca7af8d..c35c3a7eef 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c @@ -2768,7 +2768,6 @@ get_slot_for_input (GstDecodebin3 * dbin, DecodebinInputStream * input) if (empty_slot) { GST_DEBUG_OBJECT (dbin, "Re-using existing unused slot %d", empty_slot->id); - empty_slot->input = input; return empty_slot; }