From e1e48b9fea2eabb116908ecace973a2d2b48219e Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 3 Oct 2024 17:05:15 +0200 Subject: [PATCH] decodebin3: Free pending events on input pads when unlinking Otherwise we could end up with *old* events leaking through on the next linking. Part-of: --- subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c index 29610bb9de..b74b98ca2c 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c @@ -1705,6 +1705,11 @@ gst_decodebin3_input_pad_unlink (GstPad * pad, GstPad * peer, GST_DEBUG_OBJECT (dbin, "Resetting parsebin since it's pull-based"); gst_decodebin_input_reset_parsebin (dbin, input); } + + g_list_free_full (input->events_waiting_for_collection, + (GDestroyNotify) gst_event_unref); + input->events_waiting_for_collection = NULL; + /* In all cases we will be receiving new stream-start and data */ input->group_id = GST_GROUP_ID_INVALID; input->drained = FALSE;