Skip to content

Commit 70f174a

Browse files
committed
wip
1 parent 0331698 commit 70f174a

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

format/mpeg/mpeg_ts.go

+2-8
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,8 @@ func (tb *tsBuffer) Reset() {
7373

7474
func tsContinuityUpdate(tcm map[int]int, pid int, current int) bool {
7575
prev, prevFound := tcm[pid]
76-
valid := (prevFound && ((prev+1)&0xf == current)) || current == 0
77-
if valid {
78-
tcm[pid] = current
79-
return true
80-
}
81-
if prevFound {
82-
delete(tcm, pid)
83-
}
76+
valid := prevFound && ((prev+1)&0xf == current)
77+
tcm[pid] = current
8478
return valid
8579
}
8680

format/mpeg/mpeg_ts_packet.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ func tsPacketDecode(d *decode.D) any {
5959

6060
switch {
6161
case prevFound && (prev+1)&0xf == current:
62-
s.Description = "valid"
62+
s.Description = "continuous"
6363
case prevFound:
64-
s.Description = "invalid"
64+
s.Description = "non-continuous"
6565
default:
6666
s.Description = "unknown"
6767
}

0 commit comments

Comments
 (0)