[vlc-commits] mkv: fix seek crash on osx

David Fuhrmann git at videolan.org
Thu Feb 23 15:26:25 CET 2012


vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Thu Feb 23 12:15:46 2012 +0100| [7574dc547d03c746595d55098e6b6172b7556269] | committer: Jean-Baptiste Kempf

mkv: fix seek crash on osx

Close #6178
(cherry picked from commit 64ffbe934c7e3bd6452ef97062e3cd49f31e3e06)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=7574dc547d03c746595d55098e6b6172b7556269
---

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

diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index c6e6993..9f0c1dc 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -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++ )
         {



More information about the vlc-commits mailing list