From 60bad4815db966a8e4f69e333203a995e38e0159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 16 Dec 2015 17:07:54 +0100 Subject: [PATCH] Revert "decodebin2: fix deadlock on chain shutdown" This reverts commit 77dc09c3a9a5e5e371e189f39b5557db440a8dc9. It can cause the FLUSH_START/STOP events to go to the sink elements, which then causes state changes and various other problems. We shouldn't really flush downstream here, the idea is to do *draining*. Apart from that the testcase for the original bug here works without this commit now. --- gst/playback/gstdecodebin2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index d402527ac7..9668849366 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -3432,10 +3432,8 @@ gst_decode_chain_free_internal (GstDecodeChain * chain, gboolean hide) if (chain->endpad) { if (chain->endpad->exposed) { - 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); + gst_element_remove_pad (GST_ELEMENT_CAST (chain->dbin), + GST_PAD_CAST (chain->endpad)); } decode_pad_set_target (chain->endpad, NULL);