hls: improve performance

This commit is contained in:
aler9 2021-11-30 22:02:02 +01:00
parent 82d8dfbc6d
commit 7668c88d3e

View File

@ -107,8 +107,7 @@ func (m *muxerTSGenerator) writeH264(pts time.Duration, nalus [][]byte) error {
// add SPS and PPS before every IDR
if typ == h264.NALUTypeIDR {
filteredNALUs = append(filteredNALUs, m.h264Conf.SPS)
filteredNALUs = append(filteredNALUs, m.h264Conf.PPS)
filteredNALUs = append(filteredNALUs, m.h264Conf.SPS, m.h264Conf.PPS)
}
filteredNALUs = append(filteredNALUs, nalu)