1
1
mirror of https://github.com/wader/fq.git synced 2024-07-14 15:20:31 +03:00
This commit is contained in:
Mattias Wadman 2023-01-22 10:48:37 +01:00
parent 03316988aa
commit 70f174a8b5
2 changed files with 4 additions and 10 deletions

View File

@ -73,14 +73,8 @@ func (tb *tsBuffer) Reset() {
func tsContinuityUpdate(tcm map[int]int, pid int, current int) bool {
prev, prevFound := tcm[pid]
valid := (prevFound && ((prev+1)&0xf == current)) || current == 0
if valid {
tcm[pid] = current
return true
}
if prevFound {
delete(tcm, pid)
}
valid := prevFound && ((prev+1)&0xf == current)
tcm[pid] = current
return valid
}

View File

@ -59,9 +59,9 @@ func tsPacketDecode(d *decode.D) any {
switch {
case prevFound && (prev+1)&0xf == current:
s.Description = "valid"
s.Description = "continuous"
case prevFound:
s.Description = "invalid"
s.Description = "non-continuous"
default:
s.Description = "unknown"
}