mirror of https://bitbucket.org/ausocean/av.git
container/mts/mpegts.go: fixed nil map bug in FindPSI
This commit is contained in:
parent
ed11fac655
commit
a19c0f4ec3
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue