container/mts/mpegts.go: fixed nil map bug in FindPSI

This commit is contained in:
Saxon 2019-08-06 15:40:37 +09:30
parent ed11fac655
commit a19c0f4ec3
1 changed files with 1 additions and 1 deletions

View File

@ -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") 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 { for _, s := range streams {
streamMap[s.ElementaryPid()] = s.StreamType() streamMap[s.ElementaryPid()] = s.StreamType()
} }