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 659242 - [matroskademux] Unexpected EOS when seeking on paused matroska file
[matroskademux] Unexpected EOS when seeking on paused matroska file
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-09-16 13:11 UTC by Branko Subasic
Modified: 2011-09-16 13:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Prevent the demuxer from sending EOS when doing a flushing seek while in paused state (4.47 KB, patch)
2011-09-16 13:11 UTC, Branko Subasic
committed Details | Review

Description Branko Subasic 2011-09-16 13:11:13 UTC
Created attachment 196718 [details] [review]
Prevent the demuxer from sending EOS when doing a flushing seek while in paused state

Create a pipeline similar to the following

filesrc ! matroskademux ! queue ! ...

Pause the pipeline and wait for it to preroll. Then do a flushing seek.
Sometimes this will result in the demuxer sending an EOS.

This is done from gst_matroska_demux_loop() because it gets a  
GST_FLOW_UNEXPECTED return value from the EBML-reader, from
gst_ebml_peek_id_length(). This function will always return GST_FLOW_UNEXPECTED
if the peek fails. No matter what the reason for the fail is.

For example, in the situation above (when the EOS is sent) the reason for the
peek failure is that the filesrc is flushing, and returns GST_FLOW_WRONG_STATE when the get_range function is called. But this never reaches the ebml reader,
which instead returns a GST_FLOW_UNEXPECTED.

I have attached a patch where I have changed the reader to return the correct 
value, i.e. the value that the peek function returns.
Comment 1 Sebastian Dröge (slomo) 2011-09-16 13:20:30 UTC
commit 11b0a0effcf0e23d9abf8425f191b932188e3a74
Author: Branko Subasic <branko@axis.com>
Date:   Fri Sep 16 15:03:23 2011 +0200

    matroskademux: Avoid sending EOS when in paused state
    
    Changed the ebml reader's gst_ebml_peek_id_length() function so
    that it returns the actual reason for why the peek failed, instead
    of (almost) always returning GST_FLOW_UNEXPECTED. This prevents
    the pulling task from sending EOS when doing a flushing seek.