From 78e43a63193f8afbd3a330773539f46e1344f5e1 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 14 Nov 2022 09:54:24 +0100 Subject: [PATCH] decodebin3: Clear input collection when linked again The previous collection no longer applies to this input Part-of: --- subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c index 3968929..c5543b8 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c @@ -891,6 +891,17 @@ gst_decodebin3_input_pad_link (GstPad * pad, GstObject * parent, GstPad * peer) res = GST_PAD_LINK_REFUSED; } } + + /* Clear stream-collection corresponding to current INPUT. We do not + * recalculate the global one yet, it will be done when at least one + * collection is received/computed for this input. + */ + if (input->collection) { + GST_DEBUG_OBJECT (pad, "Clearing input collection"); + gst_object_unref (input->collection); + input->collection = NULL; + } + INPUT_UNLOCK (dbin); return res; -- 2.7.4