From 7668c88d3e8029afc6229fc2355591b3ed5bea23 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Tue, 30 Nov 2021 22:02:02 +0100 Subject: [PATCH] hls: improve performance --- internal/hls/muxer_ts_generator.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/hls/muxer_ts_generator.go b/internal/hls/muxer_ts_generator.go index 8edae068..40b91604 100644 --- a/internal/hls/muxer_ts_generator.go +++ b/internal/hls/muxer_ts_generator.go @@ -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)