Skip to content

Commit

Permalink
codec: avcodec: simplify clock set condition
Browse files Browse the repository at this point in the history
date is always >= VLC_TS_INVALID
  • Loading branch information
fcartegnie committed Nov 2, 2014
1 parent 09acd6d commit 7307480
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/codec/avcodec/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
date_Init( &p_sys->end_date, ctx->sample_rate, 1 );

if( p_block->i_pts > VLC_TS_INVALID &&
p_block->i_pts > date_Get( &p_sys->end_date ) )
if( p_block->i_pts > date_Get( &p_sys->end_date ) )
{
date_Set( &p_sys->end_date, p_block->i_pts );
}
Expand Down

0 comments on commit 7307480

Please sign in to comment.