GNOME Bugzilla – Bug 429322
[matroska-demux] hangs if file starts at non-zero timestamp
Last modified: 2008-06-19 08:22:01 UTC
Please describe the problem: Playing an mkv file containing a video stream with starting cluster timecode \> 0, the video hangs after the first image has been shown. Steps to reproduce: 1. Generate an mkv file with starting cluster timecode \>\> 0. 2. gst-launch-0.10 filesrc location=\<mkv file path\>! matroskademux ! jpegdec ! xvimagesink 3. Actual results: You get the first image of the video, then the video hangs, waiting to reach the time in the cluster timecode. Expected results: The video should play as normal. Does this happen every time? Yes. Other information:
Created attachment 86291 [details] A file with starting cluster timecode >> 0 Use this mkv file and set up an example pipe as in the problem description
Created attachment 86292 [details] [review] Possible solution to the problem
Looks good, I'll commit this patch or something similar fixing this issue in the next days.
2008-06-19 Sebastian Dröge <slomo@circular-chaos.org> * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_blockgroup_or_simpleblock): If a gap of more than 1/2 second is found in one stream send a NEWSEGMENT event to not stall the pipeline if the gap is too large. This also fixes Matroska files where the first buffer doesn't start at timestamp 0. Fixes bug #429322. The duration of a block is the default duration multiplied with the number of laces. Every lace is one frame and the default duration is the duration of one frame. This fixes playback of files that use lacing for some tracks.