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 750028 - hlsdemux: Search more when advancing fragment
hlsdemux: Search more when advancing fragment
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
Other All
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 745171 745281 (view as bug list)
Depends on:
Reported: 2015-05-28 12:34 UTC by Edward Hervey
Modified: 2015-05-29 07:34 UTC
See Also:
GNOME target: ---
GNOME version: ---

hlsdemux: Search more when advancing fragment (2.15 KB, patch)
2015-05-28 12:34 UTC, Edward Hervey
committed Details | Review
Graph of low/high/current mediafile sequence (45.93 KB, image/png)
2015-05-28 12:40 UTC, Edward Hervey

Description Edward Hervey 2015-05-28 12:34:09 UTC
Description in the commit message
Comment 1 Edward Hervey 2015-05-28 12:34:13 UTC
Created attachment 304151 [details] [review]
hlsdemux: Search more when advancing fragment

In live situations, it is not uncommon for the current fragment to end
up out of the (updated) play range (lowest/highest sequence). But the next
fragment to play *is* present in the play range.

When advancing, if we can't find the current GstM3U8MediaFile, don't abort
straight away. Instead, look if a GstM3U8MediaFile with the next sequence value
is present, and if so switch to it.
Comment 2 Edward Hervey 2015-05-28 12:40:33 UTC
Created attachment 304153 [details]
Graph of low/high/current mediafile sequence

This is a plot from the radio4 stream mentioned in #745171 

The first/last seqnum lines are the lowest/highest fragment sequence (when a m3u8 gets updated).
The current seqnum line corresponds to the fragment being downloaded

As can be noticed in 3 places (at 171s, 305s and 376s), the low seqnum line overtakes the "current" line. Without this patch, this would result in hlsdemux not advancing, baseadaptivedemux triggering a discont, and the sending the next fragment. This would cause various issues.

With the patch, due to looking harder for the "next" fragment, we no longer fail.

Notice also that we are not getting "late" here. If that was the case, the current line would not be parallel (i.e. having the same rate) as the high/low plots.
Comment 3 Edward Hervey 2015-05-28 12:41:16 UTC
This potentially fixes bug #745171 and #745281
Comment 4 Sebastian Dröge (slomo) 2015-05-28 20:36:23 UTC
*** Bug 745171 has been marked as a duplicate of this bug. ***
Comment 5 Philippe Normand 2015-05-29 07:34:19 UTC
*** Bug 745281 has been marked as a duplicate of this bug. ***