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 774831 - queue2: handle overwriting the current range correctly
queue2: handle overwriting the current range correctly
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-22 08:38 UTC by Michael Olbrich
Modified: 2018-11-03 12:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
queue2: handle overwriting the current range correctly (2.42 KB, patch)
2016-11-22 08:38 UTC, Michael Olbrich
none Details | Review

Description Michael Olbrich 2016-11-22 08:38:33 UTC
Created attachment 340491 [details] [review]
queue2: handle overwriting the current range correctly

This basically reverts b3802f7a9e7988901367196dd3dc45cf4053d850 ("queue2:
fix crash deleting current region for small ring buffers") and fixes the
original problem correctly.

Ignoring the current range while checking which ranges must be truncated or
removed is incorrect. With just one range, it it possible, that the offset
of the current range must be adjusted because the corresponding data will
be overwritten.
To fix the original problem, the current range is never removed. Instead it
may be truncated to zero length before the new data is appended.


Note: The test-case from the original commit still works and my test-case (seeking backwards to a position in the current range that was overwritten but not removed from the range) works again. But I'm not 100% sure I got all possible corner cases, so someone with better understanding of queue2 should probably double check this.
Comment 1 Sebastian Dröge (slomo) 2016-11-22 11:44:18 UTC
Can you also add a test for your new case?
Comment 2 Vincent Penquerc'h 2016-11-22 12:07:02 UTC
AFAICT, this restores the adjustments to the current range which b3802f7a9e7988901367196dd3dc45cf4053d850 would have also bypassed, by checking for current only when actually removing.
I don't claim to understand how the range code all works, but the patch looks OK to me.
Comment 3 Michael Olbrich 2016-11-22 13:27:46 UTC
This triggers the bug for me:

gst-validate-1.0 --set-scenario trick_mode_seeks \
  playbin ring-buffer-max-size=50000 \
  uri=http://ftp.nluug.nl/pub/graphics/blender/demo/movies/ToS/tears_of_steel_720p.mov
Comment 4 GStreamer system administrator 2018-11-03 12:38:28 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/gstreamer/issues/208.