mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 04:56:24 +00:00
jitterbuffer: fix race in flush-start/flush-stop
When flush-stop arrives before we process the result of the _push() in the loop function, we might pause even though we are not flushing anymore. Fix this race by waiting for the srcpad loop function to completely pause after doing the flush-start.
This commit is contained in:
parent
ef548c2b28
commit
d4892859d4
1 changed files with 2 additions and 0 deletions
|
@ -1337,6 +1337,8 @@ gst_rtp_jitter_buffer_sink_event (GstPad * pad, GstObject * parent,
|
||||||
case GST_EVENT_FLUSH_START:
|
case GST_EVENT_FLUSH_START:
|
||||||
ret = gst_pad_push_event (priv->srcpad, event);
|
ret = gst_pad_push_event (priv->srcpad, event);
|
||||||
gst_rtp_jitter_buffer_flush_start (jitterbuffer);
|
gst_rtp_jitter_buffer_flush_start (jitterbuffer);
|
||||||
|
/* wait for the loop to go into PAUSED */
|
||||||
|
gst_pad_pause_task (priv->srcpad);
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_FLUSH_STOP:
|
case GST_EVENT_FLUSH_STOP:
|
||||||
ret = gst_pad_push_event (priv->srcpad, event);
|
ret = gst_pad_push_event (priv->srcpad, event);
|
||||||
|
|
Loading…
Reference in a new issue