[vlc-commits] MKV: Fix seek to 0 with a non null time offset

Denis Charmet git at videolan.org
Thu Sep 6 14:31:34 CEST 2012


vlc | branch: master | Denis Charmet <typx at dinauz.org> | Thu Sep  6 13:02:05 2012 +0200| [597e34b81febddfabf45e5d821e99abd109fa94b] | committer: Jean-Baptiste Kempf

MKV: Fix seek to 0 with a non null time offset

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=597e34b81febddfabf45e5d821e99abd109fa94b
---

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

diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 8c0f8f5..929d93d 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -761,7 +761,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
 
 #if !defined(WIN32) && !defined(__ANDROID__)
     /* Don't try complex seek if we seek to 0 */
-    if( i_date == 0 )
+    if( i_date == 0 && i_time_offset == 0 )
     {
         es_out_Control( sys.demuxer.out, ES_OUT_SET_NEXT_DISPLAY_TIME, 0 );
         es_out_Control( sys.demuxer.out, ES_OUT_SET_PCR, VLC_TS_0 );
@@ -846,7 +846,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
 
     for(;;)
     {
-        while( i_pts < i_date )
+        do
         {
             bool b_key_picture;
             bool b_discardable_picture;
@@ -889,7 +889,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
             }
 
             delete block;
-        }
+        } while( i_pts < i_date );
         if( b_has_key || !i_idx )
             break;
 



More information about the vlc-commits mailing list