Commit eaf6a998 authored by Steve Lhomme's avatar Steve Lhomme

mkv.cpp: don't decode frames when they shouldn't be

parent 24912093
......@@ -3167,6 +3167,32 @@ static int Demux( demux_t *p_demux)
es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pts );
}
if( p_sys->i_pts >= p_sys->i_start_pts )
if ( p_vsegment->UpdateCurrentToChapter( *p_demux ) )
{
i_return = 1;
break;
}
if ( p_vsegment->Edition() && p_vsegment->Edition()->b_ordered && p_vsegment->CurrentChapter() == NULL )
{
/* nothing left to read in this ordered edition */
if ( !p_vsegment->SelectNext() )
break;
p_segment->UnSelect( );
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
/* switch to the next segment */
p_segment = p_vsegment->Segment();
if ( !p_segment->Select( 0 ) )
{
msg_Err( p_demux, "Failed to select new segment" );
break;
}
continue;
}
BlockDecode( p_demux, block, p_sys->i_pts, i_block_duration );
delete block;
......
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