After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791981 - hlsdemux: check sequence number as spec defined
hlsdemux: check sequence number as spec defined
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-12-27 12:51 UTC by Jun Xie
Modified: 2018-11-03 14:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
check sequence number as spec defined (8.55 KB, patch)
2017-12-27 12:53 UTC, Jun Xie
none Details | Review

Description Jun Xie 2017-12-27 12:51:22 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.
Comment 1 Jun Xie 2017-12-27 12:52:51 UTC
#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.
Comment 2 Jun Xie 2017-12-27 12:53:23 UTC
Created attachment 366012 [details] [review]
check sequence number as spec defined
Comment 3 GStreamer system administrator 2018-11-03 14:17:01 UTC
-- 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.