[vlc-devel] Re: Crash while seeking a Matroska file (Ticket #1006 et all) -fix

Steve Lhomme robux4 at gmail.com
Thu May 10 09:37:22 CEST 2007

Harry Sintonen wrote:
>   Hello!
> I've tracked down the MKV seek crash to modules/demux/mkv.cpp
> void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset )
> The 'while( i_track_skipping > 0 )' -loop does BlockGet() to get the 
> 'block'. However for LIBMATROSKA_VERSION >= 0x000800 it can happen 
> that the 'block' is NULL, resulting in NULL references later in the loop:
>             if( tracks[i_track]->i_number == block->TrackNum() )
> and:
>         sys.i_pts = (sys.i_chapter_time + block->GlobalTimecode()) / 
> (mtime_t) 1000;
> I've included a proposed fix as an attachment (I bet those long lines
> would barf).
> In case the attachment is stripped down, it's temporarily here aswell:
> http://www.iki.fi/sintonen/temp/mkv.cpp.diff.txt

The patch looks correct to me. Although I'd assume VLC always uses an up 
to date version of libmatroska. I also thought that simpleblock had been 
supported for quite a while, maybe not when seeking. So this patch is 


This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list