The marker #EXT-X-DISCONTINUITY had been introduced in the specification
to support intermixing different sources (e.g. advertisement).
---
 libavformat/hls.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 290f12e..827abbb 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -278,6 +278,8 @@ static int parse_playlist(HLSContext *c, const char *url,
         } else if (av_strstart(line, "#EXTINF:", &ptr)) {
             is_segment = 1;
             duration   = atof(ptr) * AV_TIME_BASE;
+        } else if (av_strstart(line, "#EXT-X-DISCONTINUITY", &ptr)) {
+            c->first_packet = 1;
         } else if (av_strstart(line, "#", NULL)) {
             continue;
         } else if (line[0]) {
-- 
1.9.0

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to