rtpjitterbuffer: Fix packet dropping after a big discont

We would queue 5 consective packets before considering a reset and a proper
discont here. Instead of expecting the next output packet to have the current
seqnum (i.e. the fifth), expect it to have the first seqnum. Otherwise we're
going to drop all queued up packets.
This commit is contained in:
Sebastian Dröge 2015-12-09 12:24:09 +02:00
parent 34b26ea0cc
commit e4b2360e6e

View file

@ -2602,7 +2602,17 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
remove_all_timers (jitterbuffer);
priv->discont = TRUE;
priv->last_popped_seqnum = -1;
priv->next_seqnum = seqnum;
if (priv->gap_packets.head) {
GstBuffer *gap_buffer = priv->gap_packets.head->data;
GstRTPBuffer gap_rtp = GST_RTP_BUFFER_INIT;
gst_rtp_buffer_map (gap_buffer, GST_MAP_READ, &gap_rtp);
priv->next_seqnum = gst_rtp_buffer_get_seq (&gap_rtp);
gst_rtp_buffer_unmap (&gap_rtp);
} else {
priv->next_seqnum = seqnum;
}
priv->last_in_dts = -1;
priv->next_in_seqnum = -1;