GNOME Bugzilla – Bug 680427
[matroskademux] Error handling when seek to broken section.
Last modified: 2012-07-23 13:45:00 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;
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