avformat/hlsenc: minus subtitle streams count when subtitle stream between video...
authorSteven Liu <liuqi05@kuaishou.com>
Tue, 20 Jul 2021 12:07:36 +0000 (20:07 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Thu, 19 Aug 2021 10:24:15 +0000 (18:24 +0800)
commitc64d56a2f53455f803456811873ff08fce98e122
treed9cce5153284ffcc7c7dff9e8796fd844c611275
parent5dc1b4b9979c84efc3b81bcb2c244e71e22a951a
avformat/hlsenc: minus subtitle streams count when subtitle stream between video and audio streams

because subtitles streams will be written to webvtt m3u8 list
so the stream index should minus subtitles streams count when subtitle
between audio and video streams.
testcase:
before patch:
ffmpeg -i input -map 0:a:0 -map 0:s:0 -map 0:v:0 -f hls aaaa.m3u8
will EXC_BAD_ACCESS

after patch:
ffmpeg -i input -map 0:a:0 -map 0:s:0 -map 0:v:0 -f hls aaaa.m3u8
will ok

Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
libavformat/hlsenc.c