From 018a6192bdb4a08848e8ac4307dc60ff08da045f Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sat, 26 Nov 2022 01:21:33 +1100 Subject: [PATCH] hlsdemux2: Include skipped segments in MSN calculation When a playlist has skipped segments, increment the MSN to account for them so the remaining segments end up with the right sequence numbers. Part-of: --- subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c index 4744db0c04..d1affe5d7d 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c @@ -1154,6 +1154,9 @@ gst_hls_media_playlist_parse (gchar * data, } else if (g_str_has_prefix (data_ext_x, "SKIP:")) { data += strlen ("#EXT-X-SKIP:"); parse_skip_tag (self, data); + /* Increment the current MSN by the number + * of segments that were removed */ + mediasequence += self->skipped_segments; } else { GST_LOG ("Ignored line: %s", data); }