Commit 7307480b authored by Francois Cartegnie's avatar Francois Cartegnie

codec: avcodec: simplify clock set condition

date is always >= VLC_TS_INVALID
parent 09acd6df
...@@ -380,8 +380,7 @@ static block_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block ) ...@@ -380,8 +380,7 @@ static block_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block )
if( p_dec->fmt_out.audio.i_rate != (unsigned int)ctx->sample_rate ) if( p_dec->fmt_out.audio.i_rate != (unsigned int)ctx->sample_rate )
date_Init( &p_sys->end_date, ctx->sample_rate, 1 ); date_Init( &p_sys->end_date, ctx->sample_rate, 1 );
if( p_block->i_pts > VLC_TS_INVALID && if( p_block->i_pts > date_Get( &p_sys->end_date ) )
p_block->i_pts > date_Get( &p_sys->end_date ) )
{ {
date_Set( &p_sys->end_date, p_block->i_pts ); date_Set( &p_sys->end_date, p_block->i_pts );
} }
......
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