hls muxer: create only 7 initial gaps (#999)

instead of filling the entire segment list.
This commit is contained in:
aler9 2022-07-05 23:52:11 +02:00
parent f28540b9f4
commit 4c2a4f9642
1 changed files with 2 additions and 2 deletions

View File

@ -440,9 +440,9 @@ func (p *muxerVariantFMP4Playlist) onSegmentFinalized(segment *muxerVariantFMP4S
p.mutex.Lock()
defer p.mutex.Unlock()
// create initial gap
// add initial gaps, required by iOS LL-HLS
if p.lowLatency && len(p.segments) == 0 {
for i := 0; i < p.segmentCount; i++ {
for i := 0; i < 7; i++ {
p.segments = append(p.segments, &muxerVariantFMP4Gap{
renderedDuration: segment.renderedDuration,
})