GNOME Bugzilla – Bug 791981
hlsdemux: check sequence number as spec defined
Last modified: 2018-11-03 14:17:01 UTC
#quoted from hls spec: 6.2.2. Live Playlists Media Segments MUST be removed from the Playlist file in the order that they appear in the Playlist; otherwise, client playback can malfunction. 6.3.4. Reloading the Media Playlist File After reloading a Media Playlist, the client SHOULD verify that each Media Segment in it has the same URI (and byte range, if specified) as the Media Segment with the same Media Sequence Number in the previous Media Playlist. It SHOULD halt playback if it does not, as this normally indicates a server error.
#what is current implementation: 1. Find first case of higher/equal sequence number in new playlist 2. From there on we linearly step ahead #what is current implementation issue: 1. After reloading a Media Playlist, the client SHOULD verify that each Media Segment in it has the same URI (and byte range, if specified) as the Media Segment with the same Media Sequence Number in the previous Media Playlist. -> this is not verified in current code, first case of higher sequence number in new playlist is found as pivot. And old list and new list are step ahead. by this way, actually same media sequence number segment is not checked at all. e.g. *old playlist #EXT-X-MEDIA-SEQUENCE:2680 #EXTINF:8, https://priv.example.com/fileSequence2680.ts #EXTINF:8, https://priv.example.com/fileSequence2681.ts #EXTINF:8,\n\ https://priv.example.com/fileSequence2682.ts #EXTINF:8,\n\ https://priv.example.com/fileSequence2683.ts *new playlist #EXT-X-MEDIA-SEQUENCE:2682 #EXTINF:8, https://priv.example.com/fileSequence2682.ts #EXTINF:8, https://priv.example.com/fileSequence2683_not_the_same.ts #EXTINF:8,\n\ https://priv.example.com/fileSequence2684.ts #EXTINF:8,\n\ https://priv.example.com/fileSequence2685.ts this will be checked as validate, which shall be invalidate. 2. Media Segments MUST be removed from the Playlist file in the order that they appear in the Playlist; -> so new Playlist file's 1st sequence shall not be smaller than what in the older. -> so new Playlist file shall not be a subset of the older.
Created attachment 366012 [details] [review] check sequence number as spec defined
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/644.