mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
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
1 changed files with 4 additions and 2 deletions
|
@ -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…
Reference in a new issue