[vlc-devel] [PATCH] mkv: fix seek crash on osx

David Fuhrmann david.fuhrmann at googlemail.com
Thu Feb 23 12:15:46 CET 2012


should close #6178
---
 modules/demux/mkv/matroska_segment.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 528c2b3..5ca7083 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -690,7 +690,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
     mtime_t     i_pts = 0;
     spoint *p_first = NULL;
     spoint *p_last = NULL;
-    int i_cat;
+    int i_cat = 0;
 
     if( i_global_position >= 0 )
     {
@@ -774,7 +774,8 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
 
     /* now parse until key frame */
     const int es[3] = { VIDEO_ES, AUDIO_ES, SPU_ES };
-    for( int i = 0, i_cat = es[0]; i < 2; i_cat = es[++i] )
+    i_cat = es[0];
+    for( int i = 0; i < 2; i_cat = es[++i] )
     {
         for( i_track = 0; i_track < tracks.size(); i_track++ )
         {
-- 
1.7.7.5 (Apple Git-26)




More information about the vlc-devel mailing list