mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-27 05:51:01 +00:00
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:
parent
e708e42dcb
commit
c5d5cdcd9d
1 changed files with 10 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue