decodebin3: Clear input collection when linked again

The previous collection no longer applies to this input

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2784>
This commit is contained in:
Edward Hervey 2022-11-14 09:54:24 +01:00 committed by GStreamer Marge Bot
parent 8ce0a23a5e
commit 78e43a6319

View file

@ -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;