mirror of
https://github.com/wader/fq.git
synced 2024-08-16 07:20:32 +03:00
wip
This commit is contained in:
parent
03316988aa
commit
70f174a8b5
@ -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
|
||||
}
|
||||
|
||||
|
@ -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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user