hls muxer: restore support for EXT-X-PRELOAD-HINT

This commit is contained in:
aler9 2022-12-29 20:37:48 +01:00
parent ec8175e434
commit 242fa0bbba

View File

@ -397,7 +397,9 @@ func (p *muxerVariantFMP4Playlist) segmentReader(fname string) *MuxerFileRespons
}
}
if fname == fmp4PartName(p.nextPartID) {
// EXT-X-PRELOAD-HINT support
nextPartName := fmp4PartName(p.nextPartID)
if base == nextPartName {
p.mutex.Lock()
defer p.mutex.Unlock()
@ -422,7 +424,7 @@ func (p *muxerVariantFMP4Playlist) segmentReader(fname string) *MuxerFileRespons
Header: map[string]string{
"Content-Type": "video/mp4",
},
Body: p.partsByName[fmp4PartName(nextPartID)].reader(),
Body: p.partsByName[nextPartName].reader(),
}
}