From 74f3be1eeddc72f4b3d5402017f92cabfc3e3bbd Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Tue, 7 Sep 2021 10:23:32 +0200 Subject: [PATCH] hls: use audioAUCount only if audio is primary track --- internal/hls/muxer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/hls/muxer.go b/internal/hls/muxer.go index 18714cb8..2111a0f9 100644 --- a/internal/hls/muxer.go +++ b/internal/hls/muxer.go @@ -158,7 +158,9 @@ func (m *Muxer) WriteAAC(pts time.Duration, aus [][]byte) error { return err } - m.audioAUCount++ + if m.videoTrack == nil { + m.audioAUCount++ + } } return nil