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 775127 - hls_demux.testSeekUpdateStopPosition : The unit test that was always wrong
hls_demux.testSeekUpdateStopPosition : The unit test that was always wrong
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.10.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-26 08:15 UTC by Edward Hervey
Modified: 2016-11-26 10:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
hlsdemux: Handle GST_SEEK_TYPE_NONE seek (6.58 KB, patch)
2016-11-26 08:28 UTC, Edward Hervey
committed Details | Review

Description Edward Hervey 2016-11-26 08:15:30 UTC
This unit test has been failing for a long time...

... but it was also failing almost from the moment it was introduced.

Three different behaviours happened over time (going back chronologically):
 A) Either it outputted too much (4 fragments instead of 3)
 B) Either it didn't output enough (2 fragments instead of 3)
 C) Either it did output enough

The goal of the unit test is to check the behaviour of just updating the stop position
* Playback starts
* We then send it a non-flushing seek with a GST_SEEK_TYPE_NONE for the start position and a valid value (3s) for the stop position. i.e. we are telling it to stop when it reaches 3s (instead of playing everything).

The expected behaviour is that it should be downloading fragments 1, 2 and 3 (each 1s long).

From the very start it was wrong, it was downloading fragment 1, 2 and ...4. But the way the unit test was designed (calculating number of fragments outputted instead of *which* fragments) made it succeed.

The way it is failing currently is that it is downloading fragments 1, 2, 2 again and 3.

=> hlsdemux doesn't seem to take into account the GST_SEEK_TYPE_NONE type

=> The unit test should be improved/fixed to check the expected downloaded sequence !
Comment 1 Edward Hervey 2016-11-26 08:28:02 UTC
Created attachment 340783 [details] [review]
hlsdemux: Handle GST_SEEK_TYPE_NONE seek

When one is only updating the "stop" position (i.e. non-flushing seek,
with GST_SEEK_TYPE_NONE on the "start" (or stop in reverse) position),
we only need to store those values instead of moving the current position.
Comment 2 Edward Hervey 2016-11-26 10:05:43 UTC
commit 9053a01e723e07607f0f39ac7d7b58322cb0568d
Author: Edward Hervey <edward@centricular.com>
Date:   Sat Nov 26 09:26:36 2016 +0100

    hlsdemux: Handle GST_SEEK_TYPE_NONE seek
    
    When one is only updating the "stop" position (i.e. non-flushing seek,
    with GST_SEEK_TYPE_NONE on the "start" (or stop in reverse) position),
    we only need to store those values instead of moving the current position.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=775127