hls: fix segment splitting error introduced by c3c643c6

This commit is contained in:
aler9 2021-07-29 16:27:15 +02:00
parent 89d6d0f99e
commit 4a1ca7aa3e
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ func (m *Muxer) WriteAAC(pts time.Duration, aus [][]byte) error {
m.mutex.Lock() m.mutex.Lock()
defer m.mutex.Unlock() defer m.mutex.Unlock()
if m.videoTrack != nil { if m.videoTrack == nil {
if m.tsCurrent.firstPacketWritten && if m.tsCurrent.firstPacketWritten &&
m.tsCurrent.duration() >= m.hlsSegmentDuration && m.tsCurrent.duration() >= m.hlsSegmentDuration &&
m.audioAUCount >= segmentMinAUCount { m.audioAUCount >= segmentMinAUCount {