Commit d6f4169b authored by Filip Roséen's avatar Filip Roséen Committed by Jean-Baptiste Kempf

mkv: replaced loop with (already present) helper

BlockFindTrackIndex does what the explicit loop is doing; we should use
it.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent cc84e98f
......@@ -979,19 +979,12 @@ void matroska_segment_c::Seek( mtime_t i_mk_date, mtime_t i_mk_time_offset, int6
return;
}
/* check if block's track is in our list */
for( i_track = 0; i_track < tracks.size(); i_track++ )
{
if( (simpleblock && tracks[i_track]->i_number == simpleblock->TrackNum()) ||
(block && tracks[i_track]->i_number == block->TrackNum()) )
break;
}
if( simpleblock )
i_mk_pts = sys.i_mk_chapter_time + simpleblock->GlobalTimecode() / INT64_C(1000);
else
i_mk_pts = sys.i_mk_chapter_time + block->GlobalTimecode() / INT64_C(1000);
if( i_track < tracks.size() )
if( BlockFindTrackIndex( &i_track, block, simpleblock ) == VLC_SUCCESS )
{
if( tracks[i_track]->fmt.i_cat == i_cat && b_key_picture )
{
......
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