mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
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 not.
This commit is contained in:
parent
88a6832b2a
commit
3de2c28fc1
1 changed files with 8 additions and 2 deletions
|
@ -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)
|
||||
JBUF_SIGNAL_EVENT (priv);
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue