[vlc-devel] [PATCH] Fix seek to 0 with a non null time offset
Denis Charmet
typx at dinauz.org
Thu Sep 6 13:02:05 CEST 2012
---
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 fab4929..cf032de 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -739,7 +739,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 );
@@ -824,7 +824,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;
@@ -867,7 +867,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;
--
1.7.10.4
More information about the vlc-devel
mailing list