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 680427 - [matroskademux] Error handling when seek to broken section.
[matroskademux] Error handling when seek to broken section.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.31
Other All
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-23 04:43 UTC by GI Jung
Modified: 2012-07-23 13:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description GI Jung 2012-07-23 04:43:52 UTC
Let's see below simplified file.
cluster ( #1, offset: 100, next_cluster_offset: 200 )
cluster ( #2, offset: 200, next_cluster_offset: 300 )
cluster ( #3, offset: 300, next_cluster_offset: 400 )
	............

cluster ( #100, offset: 10000, next_cluster_offset: 10100 )
  Unknown ID ( 0x00 )
  Unknown ID ( 0x00 )
  Unknown ID ( 0x00 )
	............

Demux is parsing currently #1 cluster, assuming seek to #100 cluster.
After handling seek event, demux->common.offset is 10000 and demux->next_cluster_offset is still 200.
Becasue the data is broken at 10000 offset, demux->common.offset will be changed to 200 in gst_matroska_demux_check_parse_error() function.
Demux will parse next cluster from 200 offset, but demux should search next cluster from 10000 offset.
demux->next_cluster_offset should be reset to 0 before the end of handling seek event.
So, I think it is a kind of solution to add below 2 lines in gst_matroska_demux_move_to_entry() function.

  demux->common.offset = entry->pos + demux->common.ebml_segment_start;
  /* reset next_cluster_offset */
  if( reset )
    demux->next_cluster_offset = 0;
Comment 1 Mark Nauwelaerts 2012-07-23 13:45:00 UTC
Thanks for noting, fixed along above lines in following commit:

commit 8fb6e831434c8705819993d86f3931a6b8f12a26
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Mon Jul 23 15:33:54 2012 +0200

    matroskademux: proper parse recovery after seek
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680427