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 787538 - matroskademux: infinite loop when seeking backward
matroskademux: infinite loop when seeking backward
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-09-11 10:07 UTC by Julien Isorce
Modified: 2017-09-19 21:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Julien Isorce 2017-09-11 10:07:33 UTC
sample: https://drive.google.com/file/d/0Bzat_iFKrgCWZm96Z0dvNnFva1U/view?usp=sharing

Steps: 
1) gst-launch-1.0 filesrc location=trailer.mkv ! matroskademux ! vp8dec ! navseek ! xvimagesink
2) Wait a few seconds
3) Press right arrow to do one seek forward
4) Press left arrow to do one seek backward

(It also happens if you skip either step 2 or 3)

gst_matroska_demux_search_pos:<matroskademux0> overshot target
gst_matroska_demux_flush:<matroskademux0> skipping 12 bytes

It loops here:

https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/matroska/matroska-demux.c#n1865

Triggered by:
https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/matroska/matroska-demux.c#n1963

I have tried on a few mkv samples and it happens only with the one pointed above.
Comment 1 Mark Nauwelaerts 2017-09-11 18:50:45 UTC
Oops ... silly mistake in (literal) edge case, should now be fixed by:

commit cf3f19501220ab859910417520b530c26ea84389
Author: Mark Nauwelaerts <mnauw@users.sourceforge.net>
Date:   Mon Sep 11 20:24:27 2017 +0200

    matroskademux: search_cluster should find preceding cluster before target
    
    ... since failing this constraint takes search_pos by surprise which might
    then end up in an infinite loop.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=787538
Comment 2 Julien Isorce 2017-09-11 21:10:46 UTC
Great! Thx Mark.
Comment 3 Sebastian Dröge (slomo) 2017-09-18 10:36:59 UTC
Should this go into 1.12 (after 1.12.3)?
Comment 4 Mark Nauwelaerts 2017-09-19 21:41:39 UTC
This fixes something that has not been included in 1.12 branch afaics, so it probably should not (unless going for the whole preceding shebang).