Browse Source

hls: improve performance

pull/714/head
aler9 4 years ago
parent
commit
7668c88d3e
  1. 3
      internal/hls/muxer_ts_generator.go

3
internal/hls/muxer_ts_generator.go

@ -107,8 +107,7 @@ func (m *muxerTSGenerator) writeH264(pts time.Duration, nalus [][]byte) error { @@ -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)

Loading…
Cancel
Save