From a19c0f4ec31afc4343b663d4801fc29b7d6a6a9a Mon Sep 17 00:00:00 2001 From: Saxon Date: Tue, 6 Aug 2019 15:40:37 +0930 Subject: [PATCH] container/mts/mpegts.go: fixed nil map bug in FindPSI --- container/mts/mpegts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container/mts/mpegts.go b/container/mts/mpegts.go index 064c0f9b..233a120c 100644 --- a/container/mts/mpegts.go +++ b/container/mts/mpegts.go @@ -277,7 +277,7 @@ func FindPSI(d []byte) (int, map[uint16]uint8, map[string]string, error) { return i, nil, meta, errors.Wrap(err, "could not get streams from PMT") } - var streamMap map[uint16]uint8 + streamMap := make(map[uint16]uint8) for _, s := range streams { streamMap[s.ElementaryPid()] = s.StreamType() }