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".

Reply via email to