fix: discard duplicate TS packets in non-PUSI continuation path
This commit is contained in:
+2
-1
@@ -314,6 +314,7 @@ impl TsDemuxer {
|
||||
Some(prev) => cc != ((prev + 1) & 0x0f) && cc != prev,
|
||||
None => false,
|
||||
};
|
||||
let is_dup = asm.last_cc == Some(cc);
|
||||
asm.last_cc = Some(cc);
|
||||
if !pusi && (discontinuity_flag || cc_gap) && asm.active {
|
||||
tracing::trace!(
|
||||
@@ -358,7 +359,7 @@ impl TsDemuxer {
|
||||
if skip < payload.len() {
|
||||
asm.push(&payload[skip..]);
|
||||
}
|
||||
} else {
|
||||
} else if !is_dup {
|
||||
asm.push(payload);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user