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). https://bugzilla.gnome.org/show_bug.cgi?id=746480
This commit is contained in:
parent
4ec0d948db
commit
77dc09c3a9
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user