Commit 62bcdf6a authored by Steve Lhomme's avatar Steve Lhomme Committed by 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: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent a0ee7281
......@@ -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 )
......
......@@ -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 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment