rtpjitterbuffer: Check exit condition immediately after JBUF_WAIT

JBUF_WAIT_QUEUE drops the JBUF_LOCK, which means the stop condition
for the chain function may have changed (change_state to NULL). Check
this immediately after the wait so that we don't delay shutting down.
This commit is contained in:
Nicolas Dufresne 2019-11-14 17:20:51 -05:00
parent e66a4b64b3
commit fd6cd6f545

View file

@ -3078,9 +3078,9 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
update_current_timer (jitterbuffer);
JBUF_WAIT_QUEUE (priv);
if (priv->srcresult != GST_FLOW_OK)
goto out_flushing;
}
if (priv->srcresult != GST_FLOW_OK)
goto out_flushing;
/* let's check if this buffer is too late, we can only accept packets with
* bigger seqnum than the one we last pushed. */