]> git.sesse.net Git - vlc/commitdiff
Fix crash in MKV demuxer. Patch courtesy of Harry Sintonen. Fix #1006
authorChristophe Mutricy <xtophe@videolan.org>
Wed, 9 May 2007 22:49:10 +0000 (22:49 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Wed, 9 May 2007 22:49:10 +0000 (22:49 +0000)
THANKS
modules/demux/mkv.cpp

diff --git a/THANKS b/THANKS
index b5ab9950b048be206f87606dd3682f005d375545..8bc3adc77f16ff9c442083ce333b5037239d0c87 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -80,6 +80,7 @@ Goetz Waschk <waschk at informatik.uni-rostock dot de> - Mandrake packages
 Haakon Meland Eriksen - Norwegian translation
 Han HoJoong <0demon0 at paran dot com> - Korean translation
 Hans-Peter Jansen <hpj at urpla.net> - patch for module options handling
+Harry Sintonen <sintonen@iki.fi> - fix for MKV demuxer
 Igor Helman - VLM msecseek command
 Ilkka Ollakka - SDP bitrate patch, various VLM fixes
 Jan Gerber <j at v2v dot org> - patch theora decoding aspect ratio
index 6d526cf1f6e84b63d8c96eb6d6de89044c55cc71..2877566a35f32da71a05b155cd6e94f8c6fc6dc5 100644 (file)
@@ -5673,13 +5673,23 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset )
 
         for( i_track = 0; i_track < tracks.size(); i_track++ )
         {
+#if LIBMATROSKA_VERSION >= 0x000800
+            if( (simpleblock && tracks[i_track]->i_number == simpleblock->TrackNum()) ||
+                (block && tracks[i_track]->i_number == block->TrackNum()) )
+#else
             if( tracks[i_track]->i_number == block->TrackNum() )
+#endif
             {
                 break;
             }
         }
 
-        sys.i_pts = (sys.i_chapter_time + block->GlobalTimecode()) / (mtime_t) 1000;
+#if LIBMATROSKA_VERSION >= 0x000800
+        if( simpleblock )
+            sys.i_pts = (sys.i_chapter_time + simpleblock->GlobalTimecode()) / (mtime_t) 1000;
+        else
+#endif
+            sys.i_pts = (sys.i_chapter_time + block->GlobalTimecode()) / (mtime_t) 1000;
 
         if( i_track < tracks.size() )
         {