Commit 77dc09c3 authored by Vincent Penquerc'h's avatar Vincent Penquerc'h

decodebin2: fix deadlock on chain shutdown

When shutting down the chain, we can get a deadlock when removing
a pad, if that chain was being busy streaming but blocked (eg, while
waiting for a queue to have free space).
parent 4ec0d948
......@@ -3247,8 +3247,10 @@ gst_decode_chain_free_internal (GstDecodeChain * chain, gboolean hide)
if (chain->endpad) {
if (chain->endpad->exposed) {
gst_element_remove_pad (GST_ELEMENT_CAST (chain->dbin),
GST_PAD_CAST (chain->endpad));
GstPad *endpad = GST_PAD_CAST (chain->endpad);
gst_pad_push_event (endpad, gst_event_new_flush_start ());
gst_pad_push_event (endpad, gst_event_new_flush_stop (FALSE));
gst_element_remove_pad (GST_ELEMENT_CAST (chain->dbin), endpad);
decode_pad_set_target (chain->endpad, NULL);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment