mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
adder: send a flush event before trying to get the stream lock
This avoids hanging when the streaming thread is busy in _chain waiting for preroll. https://bugzilla.gnome.org/show_bug.cgi?id=666379
This commit is contained in:
parent
229377fb6b
commit
bcaf5890aa
1 changed files with 6 additions and 4 deletions
|
@ -660,12 +660,14 @@ gst_adder_src_event (GstPad * pad, GstEvent * event)
|
|||
|
||||
/* check if we are flushing */
|
||||
if (flush) {
|
||||
/* make sure we accept nothing anymore and return WRONG_STATE */
|
||||
gst_collect_pads2_set_flushing (adder->collect, TRUE);
|
||||
|
||||
/* flushing seek, start flush downstream, the flush will be done
|
||||
* when all pads received a FLUSH_STOP. */
|
||||
* when all pads received a FLUSH_STOP.
|
||||
* Make sure we accept nothing anymore and return WRONG_STATE.
|
||||
* We send a flush-start before, to ensure no streaming is done
|
||||
* as we need to take the stream lock.
|
||||
*/
|
||||
gst_pad_push_event (adder->srcpad, gst_event_new_flush_start ());
|
||||
gst_collect_pads2_set_flushing (adder->collect, TRUE);
|
||||
|
||||
/* We can't send FLUSH_STOP here since upstream could start pushing data
|
||||
* after we unlock adder->collect.
|
||||
|
|
Loading…
Reference in a new issue