From 4a1ca7aa3eaaa9dcd24a27443f20cfd30f6804c4 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Thu, 29 Jul 2021 16:27:15 +0200 Subject: [PATCH] hls: fix segment splitting error introduced by c3c643c6 --- internal/hls/muxer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/hls/muxer.go b/internal/hls/muxer.go index 23f7faef..3ef72841 100644 --- a/internal/hls/muxer.go +++ b/internal/hls/muxer.go @@ -141,7 +141,7 @@ func (m *Muxer) WriteAAC(pts time.Duration, aus [][]byte) error { m.mutex.Lock() defer m.mutex.Unlock() - if m.videoTrack != nil { + if m.videoTrack == nil { if m.tsCurrent.firstPacketWritten && m.tsCurrent.duration() >= m.hlsSegmentDuration && m.audioAUCount >= segmentMinAUCount {