From 774432bd5eaa2a847f54e232291c08d8c145a207 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Fri, 30 Dec 2022 20:56:50 +0100 Subject: [PATCH] Don't pass pid to addMapping. addMapping assumes the piddelta is constant, so it doesn't need the pid. --- packetmap/packetmap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packetmap/packetmap.go b/packetmap/packetmap.go index 9073cb7..0635c51 100644 --- a/packetmap/packetmap.go +++ b/packetmap/packetmap.go @@ -45,7 +45,7 @@ func (m *Map) Map(seqno uint16, pid uint16) (bool, uint16, uint16) { m.nextPid = pid return true, seqno, 0 } - addMapping(m, seqno, pid, m.delta, m.pidDelta) + addMapping(m, seqno, m.delta, m.pidDelta) m.next = seqno + 1 m.nextPid = pid return true, seqno + m.delta, m.pidDelta @@ -70,7 +70,7 @@ func (m *Map) reset() { m.entries = nil } -func addMapping(m *Map, seqno, pid uint16, delta, pidDelta uint16) { +func addMapping(m *Map, seqno, delta, pidDelta uint16) { if len(m.entries) == 0 { // this shouldn't happen return