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 788417 - hls: Fix media sequence handling when encountering loops
hls: Fix media sequence handling when encountering loops
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-10-02 08:43 UTC by Jan Alexander Steffens (heftig)
Modified: 2017-10-19 13:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH 1/5] m3u8: Simplify control flow for sequence update (1.91 KB, patch)
2017-10-02 08:45 UTC, Jan Alexander Steffens (heftig)
committed Details | Review
[PATCH 2/5] m3u8: Split gst_m3u8_update_check_consistent_media_seqnums (9.16 KB, patch)
2017-10-02 08:46 UTC, Jan Alexander Steffens (heftig)
committed Details | Review
[PATCH 3/5] m3u8: Ignore empty playlists in check_media_seqnums (1.95 KB, patch)
2017-10-02 08:46 UTC, Jan Alexander Steffens (heftig)
committed Details | Review
[PATCH 4/5] m3u8: Don't try to match URIs when we have media sequences (3.69 KB, patch)
2017-10-02 08:47 UTC, Jan Alexander Steffens (heftig)
committed Details | Review
[PATCH 5/5] m3u8: Refine sequence update debug messages (2.51 KB, patch)
2017-10-02 08:47 UTC, Jan Alexander Steffens (heftig)
committed Details | Review

Description Jan Alexander Steffens (heftig) 2017-10-02 08:43:41 UTC
Don't try to match URIs when we have media sequences. It is legal
for a stream to reuse segments (marking discontinuities as needed).
Uplynk delivers such playlists for their placeholder loops.
    
Leave the URI scanning in place for playlists which have no
EXT-X-MEDIA-SEQUENCE tag. This should be harmless since the spec
requires these playlists to not be missing segments (RFC8216 6.2.2),
so we should be always matching on the first segment.

Also do a bunch of refactoring. Patches follow.
Comment 1 Jan Alexander Steffens (heftig) 2017-10-02 08:45:34 UTC
Created attachment 360741 [details] [review]
[PATCH 1/5] m3u8: Simplify control flow for sequence update

Split the tail from the rest of the loop.
Comment 2 Jan Alexander Steffens (heftig) 2017-10-02 08:46:01 UTC
Created attachment 360742 [details] [review]
[PATCH 2/5] m3u8: Split gst_m3u8_update_check_consistent_media_seqnums

The function was basically one big if-else. Move the branch to the
one caller.

Currently, it's never called with previous_files == NULL. Assert that
this continues.
Comment 3 Jan Alexander Steffens (heftig) 2017-10-02 08:46:30 UTC
Created attachment 360743 [details] [review]
[PATCH 3/5] m3u8: Ignore empty playlists in check_media_seqnums

Let these error in the immediately following check in gst_m3u8_update.
Comment 4 Jan Alexander Steffens (heftig) 2017-10-02 08:47:03 UTC
Created attachment 360744 [details] [review]
[PATCH 4/5] m3u8: Don't try to match URIs when we have media sequences

It is legal for a stream to reuse segments (marking discontinuities as
needed). Uplynk delivers such playlists for their placeholder loops.

Leave the URI scanning in place for playlists which have no
EXT-X-MEDIA-SEQUENCE tag. This should be harmless since the spec
requires these playlists to not be missing segments (RFC8216 6.2.2),
so we should be always matching on the first segment.
Comment 5 Jan Alexander Steffens (heftig) 2017-10-02 08:47:26 UTC
Created attachment 360745 [details] [review]
[PATCH 5/5] m3u8: Refine sequence update debug messages

Actually give some details about why it failed.