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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7609>
This commit is contained in:
Edward Hervey 2024-10-03 17:05:15 +02:00 committed by GStreamer Marge Bot
parent 38392f6049
commit e1e48b9fea

View file

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