hls muxer: add EXT-X-INDEPENDENT-SEGMENTS tag

This commit is contained in:
aler9 2022-04-20 13:40:21 +02:00
parent d5a1b8c8ab
commit 889ebef249
2 changed files with 4 additions and 0 deletions

View File

@ -84,6 +84,7 @@ func (p *muxerStreamPlaylist) reader() io.Reader {
cnt += "#EXT-X-TARGETDURATION:" + strconv.FormatUint(uint64(targetDuration), 10) + "\n"
cnt += "#EXT-X-MEDIA-SEQUENCE:" + strconv.FormatInt(int64(p.segmentDeleteCount), 10) + "\n"
cnt += "#EXT-X-INDEPENDENT-SEGMENTS\n"
cnt += "\n"
for _, s := range p.segments {

View File

@ -75,6 +75,7 @@ func TestMuxerVideoAudio(t *testing.T) {
`#EXT-X-ALLOW-CACHE:NO\n` +
`#EXT-X-TARGETDURATION:4\n` +
`#EXT-X-MEDIA-SEQUENCE:0\n` +
`#EXT-X-INDEPENDENT-SEGMENTS\n` +
`\n` +
`#EXT-X-PROGRAM-DATE-TIME:(.*?)\n` +
`#EXTINF:4,\n` +
@ -208,6 +209,7 @@ func TestMuxerVideoOnly(t *testing.T) {
`#EXT-X-ALLOW-CACHE:NO\n` +
`#EXT-X-TARGETDURATION:4\n` +
`#EXT-X-MEDIA-SEQUENCE:0\n` +
`#EXT-X-INDEPENDENT-SEGMENTS\n` +
`\n` +
`#EXT-X-PROGRAM-DATE-TIME:(.*?)\n` +
`#EXTINF:4,\n` +
@ -293,6 +295,7 @@ func TestMuxerAudioOnly(t *testing.T) {
`#EXT-X-ALLOW-CACHE:NO\n` +
`#EXT-X-TARGETDURATION:1\n` +
`#EXT-X-MEDIA-SEQUENCE:0\n` +
`#EXT-X-INDEPENDENT-SEGMENTS\n` +
`\n` +
`#EXT-X-PROGRAM-DATE-TIME:(.*?)\n` +
`#EXTINF:1,\n` +