Browse Source

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

instead of filling the entire segment list.
pull/1039/head
aler9 3 years ago
parent
commit
4c2a4f9642
  1. 4
      internal/hls/muxer_variant_fmp4_playlist.go

4
internal/hls/muxer_variant_fmp4_playlist.go

@ -440,9 +440,9 @@ func (p *muxerVariantFMP4Playlist) onSegmentFinalized(segment *muxerVariantFMP4S @@ -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,
})

Loading…
Cancel
Save