mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
jitterbuffer: reset is only possible with a GAP
This commit is contained in:
parent
f864131227
commit
9d88ac9cbb
1 changed files with 10 additions and 9 deletions
|
@ -1352,10 +1352,11 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
|
|||
/* now check against our expected seqnum */
|
||||
if (G_LIKELY (priv->next_in_seqnum != -1)) {
|
||||
gint gap;
|
||||
gboolean reset = FALSE;
|
||||
|
||||
gap = gst_rtp_buffer_compare_seqnum (priv->next_in_seqnum, seqnum);
|
||||
if (G_UNLIKELY (gap != 0)) {
|
||||
gboolean reset = FALSE;
|
||||
|
||||
GST_DEBUG_OBJECT (jitterbuffer, "expected #%d, got #%d, gap of %d",
|
||||
priv->next_in_seqnum, seqnum, gap);
|
||||
/* priv->next_in_seqnum >= seqnum, this packet is too late or the
|
||||
|
@ -1372,7 +1373,6 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
|
|||
} else {
|
||||
GST_DEBUG_OBJECT (jitterbuffer, "tolerable gap");
|
||||
}
|
||||
}
|
||||
if (G_UNLIKELY (reset)) {
|
||||
GST_DEBUG_OBJECT (jitterbuffer, "flush and reset jitterbuffer");
|
||||
rtp_jitter_buffer_flush (priv->jbuf);
|
||||
|
@ -1382,6 +1382,7 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
|
|||
priv->next_seqnum = seqnum;
|
||||
}
|
||||
}
|
||||
}
|
||||
priv->next_in_seqnum = (seqnum + 1) & 0xffff;
|
||||
|
||||
/* let's check if this buffer is too late, we can only accept packets with
|
||||
|
|
Loading…
Reference in a new issue