Commit e4b2360e authored by Sebastian Dröge's avatar Sebastian Dröge

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.
parent 34b26ea0
......@@ -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;
......
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