[vlc-commits] MKV: init the index time to -1 as it was intended
Steve Lhomme
git at videolan.org
Fri Mar 13 15:29:46 CET 2015
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Fri Mar 13 14:12:45 2015 +0100| [62bcdf6a2066b3bc413ddc30c5ff809384940dd7] | committer: Jean-Baptiste Kempf
MKV: init the index time to -1 as it was intended
As witnessed here git.videolan.org/?p=vlc.git;a=blob;f=modules/demux/mkv/matroska_segment.cpp;hb=HEAD#l1427
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=62bcdf6a2066b3bc413ddc30c5ff809384940dd7
---
modules/demux/mkv/matroska_segment.cpp | 4 ++--
modules/demux/mkv/mkv.cpp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 18558f7..acfc321 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -129,7 +129,7 @@ void matroska_segment_c::LoadCues( KaxCues *cues )
idx.i_track = -1;
idx.i_block_number= -1;
idx.i_position = -1;
- idx.i_time = 0;
+ idx.i_time = -1;
idx.b_key = true;
ep->Down();
@@ -953,7 +953,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
{
for( ; i_idx < i_index; i_idx++ )
- if( p_indexes[i_idx].i_time + i_time_offset > i_date )
+ if( p_indexes[i_idx].i_time != -1 && p_indexes[i_idx].i_time + i_time_offset > i_date )
break;
if( i_idx > 0 )
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index ce64952..101ca6c 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -468,7 +468,7 @@ static void Seek( demux_t *p_demux, mtime_t i_date, double f_percent, virtual_ch
for( i_index = 0; i_index < p_segment->i_index; i_index++ )
{
if( p_segment->p_indexes[i_index].i_position >= i_pos &&
- p_segment->p_indexes[i_index].i_time > 0 )
+ p_segment->p_indexes[i_index].i_time != -1 )
break;
}
if( i_index == p_segment->i_index )
More information about the vlc-commits
mailing list