mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
decodebin3: More cleanup DecodebinOutputStream and MultiQueueSlot
When removing DecodebinInputStream, cleanup DecodebinOutputStream and MultiQueueSlot also if they were drained. https://bugzilla.gnome.org/show_bug.cgi?id=773341
This commit is contained in:
parent
6bd7a5602c
commit
582c7cef18
1 changed files with 24 additions and 0 deletions
|
@ -567,8 +567,32 @@ parsebin_pad_removed_cb (GstElement * demux, GstPad * pad, DecodebinInput * inp)
|
|||
if (input) {
|
||||
GST_DEBUG_OBJECT (pad, "stream %p", input);
|
||||
if (inp->pending_pads == NULL) {
|
||||
MultiQueueSlot *slot;
|
||||
|
||||
GST_DEBUG_OBJECT (pad, "Remove input stream %p", input);
|
||||
|
||||
SELECTION_LOCK (dbin);
|
||||
slot = get_slot_for_input (dbin, input);
|
||||
SELECTION_UNLOCK (dbin);
|
||||
|
||||
remove_input_stream (dbin, input);
|
||||
|
||||
SELECTION_LOCK (dbin);
|
||||
if (slot && g_list_find (dbin->slots, slot) && slot->is_drained) {
|
||||
/* if slot is still there and already drained, remove it in here */
|
||||
if (slot->output) {
|
||||
DecodebinOutputStream *output = slot->output;
|
||||
GST_DEBUG_OBJECT (pad,
|
||||
"Multiqueue was drained, Remove output stream");
|
||||
|
||||
dbin->output_streams = g_list_remove (dbin->output_streams, output);
|
||||
free_output_stream (dbin, output);
|
||||
}
|
||||
GST_DEBUG_OBJECT (pad, "No pending pad, Remove multiqueue slot");
|
||||
dbin->slots = g_list_remove (dbin->slots, slot);
|
||||
free_multiqueue_slot_async (dbin, slot);
|
||||
}
|
||||
SELECTION_UNLOCK (dbin);
|
||||
} else {
|
||||
input->srcpad = NULL;
|
||||
if (input->input_buffer_probe_id)
|
||||
|
|
Loading…
Reference in a new issue