> On Apr 12, 2022, at 7:45 PM, [email protected] wrote:
>
> On Tue, Apr 12, 2022 at 4:15 PM Zhao Zhili <[email protected]> wrote:
>>
>> ---
>> libavformat/hls.c | 59 ++++++++++++++++++++++++++++++++---------------
>> 1 file changed, 40 insertions(+), 19 deletions(-)
>>
> Can these patches handle multiple instances of the media init sections?
Before and after the patch, struct playlist do take multiple media
initialization sections into consideration. However, I think it doesn’t
work for HLS as a whole. To support multiple media init sections, it
needs to handle EXT-X-DISCONTINUITY and recreate mp4 demuxer.
So even if new media init section is show up, it will be downloaded and
then dropped by mp4 muxer:
```
if (c->found_moov) {
av_log(c->fc, AV_LOG_WARNING, "Found duplicated MOOV Atom. Skipped
it\n");
avio_skip(pb, atom.size);
return 0;
}
```
What the patch does is to avoid downloading the same init sections again
and again, and then dropped by mp4 muxer. It’s common to have init section
repeat in live mode.
Just for reference, hls.js had the same issue, and have been fixed by
https://github.com/video-dev/hls.js/pull/4452
> _______________________________________________
> ffmpeg-devel mailing list
> [email protected]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> [email protected] with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".