I modified setting AVFMT_TS_DISCONT flag on HLS input format depending on whether "EXT-X-DISCONTINUITY" existed or not in M3U8. previous, commits is set AVFMT_TS_DISCONT flag unconditionally, whether "EXT-X-DISCONTINUITY" existed or not, as below https://github.com/FFmpeg/FFmpeg/commit/d6ac6650b911f0957e69545d7fc25be6b7728705#diff-0e876d29bdcae30d9d256f04bc8795db
So, I added checking and parsing "EXT-X-DISCONTINUITY" syntax, and if it exists then set AVFMT_TS_DISCONT flag. 2020년 7월 17일 (금) 오전 9:43, 김동원님(Dongwon Kim) <dongwon....@sk.com>님이 작성: > Signed-off-by: Dongwon Kim <dongwon....@sk.com> > --- > libavformat/hls.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavformat/hls.c b/libavformat/hls.c index > ba17c4ed96..5e331ab68f 100644 > --- a/libavformat/hls.c > +++ b/libavformat/hls.c > @@ -810,6 +810,8 @@ static int parse_playlist(HLSContext *c, const char > *url, > ff_parse_key_value(ptr, (ff_parse_key_val_cb) > handle_rendition_args, > &info); > new_rendition(c, &info, url); > + } else if (av_strstart(line, "#EXT-X-DISCONTINUITY", &ptr)) { > + c->ctx->iformat->flags |= AVFMT_TS_DISCONT; > } else if (av_strstart(line, "#EXT-X-TARGETDURATION:", &ptr)) { > ret = ensure_playlist(c, &pls, url); > if (ret < 0) > @@ -2406,7 +2408,7 @@ AVInputFormat ff_hls_demuxer = { > .long_name = NULL_IF_CONFIG_SMALL("Apple HTTP Live Streaming"), > .priv_class = &hls_class, > .priv_data_size = sizeof(HLSContext), > - .flags = AVFMT_NOGENSEARCH | AVFMT_TS_DISCONT, > + .flags = AVFMT_NOGENSEARCH, > .read_probe = hls_probe, > .read_header = hls_read_header, > .read_packet = hls_read_packet, > -- > 2.25.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".