On Sun, 18 May 2014, Luca Barbato wrote:

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

Well, sure we can parse the #EXT-X_DISCONTINUITY marker, but what actual effect does this have on receiving those streams? Setting c->first_packet doesn't really do anything (it only makes sure we recheck the discard flags immediately).

What one might want to do, though, is to make sure we don't compare timestamps from one variant from before the discontinuity to timestamps from another one - however I think that's not much of an issue right now either since we enforce returning packets according to segment sequence number before we check the timestamps themselves.

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

Reply via email to