jitterbuffer: discard packets with invalid pts

When RTPJitterBuffer resets itself in caluclate_pts(), it returns
GST_CLOCK_TIME_NONE and the packet should be discarded, according
to the behaviour of the standard jitterbuffer.
This commit is contained in:
Mathieu Duponchelle 2019-09-17 16:28:05 +02:00
parent e708e42dcb
commit c5d5cdcd9d

View file

@ -524,6 +524,16 @@ impl JitterBuffer {
false,
);
if pts.is_none() {
gst_debug!(
self.cat,
obj: element,
"cannot calculate a valid pts for #{}, discard",
seq
);
return Ok(gst::FlowSuccess::Ok);
}
if state.last_in_seqnum != std::u32::MAX {
let gap = gst_rtp::compare_seqnum(state.last_in_seqnum as u16, seq);
if gap == 1 {