Commit 3de2c28f authored by Nicolas Dufresne's avatar Nicolas Dufresne Committed by Nicolas Dufresne
Browse files

rtpjitterbuffer: Stop waiting after EOS

After EOS is received, it is pointless to wait for further events,
specially waiting on timers. This patches fixes two cases where we could
wait instead of returning GST_FLOW_EOS and trigger a spin of the loop
function when EOS is queued, regardless if this EOS is the queue head or
parent 88a6832b
......@@ -1825,7 +1825,7 @@ queue_event (GstRtpJitterBuffer * jitterbuffer, GstEvent * event)
GST_DEBUG_OBJECT (jitterbuffer, "adding event");
item = alloc_item (event, ITEM_TYPE_EVENT, -1, -1, -1, 0, -1);
rtp_jitter_buffer_insert (priv->jbuf, item, &head, NULL);
if (head)
if (head || priv->eos)
return TRUE;
......@@ -3625,7 +3625,13 @@ handle_next_buffer (GstRtpJitterBuffer * jitterbuffer)
GST_DEBUG_OBJECT (jitterbuffer,
"Sequence number GAP detected: expected %d instead of %d (%d missing)",
next_seqnum, seqnum, gap);
result = GST_FLOW_WAIT;
/* if we have reached EOS, just keep processing */
if (priv->eos) {
result = pop_and_push_next (jitterbuffer, seqnum);
result = GST_FLOW_OK;
} else {
result = GST_FLOW_WAIT;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment