diff --git a/format/mpeg/mpeg_ts.go b/format/mpeg/mpeg_ts.go index f7e4f9acd8..2a8026cfcc 100644 --- a/format/mpeg/mpeg_ts.go +++ b/format/mpeg/mpeg_ts.go @@ -71,14 +71,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 } diff --git a/format/mpeg/mpeg_ts_packet.go b/format/mpeg/mpeg_ts_packet.go index 2a2410a435..2456edd957 100644 --- a/format/mpeg/mpeg_ts_packet.go +++ b/format/mpeg/mpeg_ts_packet.go @@ -58,9 +58,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" }