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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
This commit is contained in:
Jan Schmidt 2022-11-26 01:21:33 +11:00 committed by GStreamer Marge Bot
parent 268a25b979
commit 018a6192bd

View file

@ -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);
}