Commit 9defa225 authored by Rafaël Carré's avatar Rafaël Carré Committed by Jean-Baptiste Kempf

avcodec audio decoder: stricter PTS output

Only trust demuxer PTS if it is higher than what we expected
Fix demuxers that send several packets with identical PTS
Close #8453

Manual Cherry-Pick from a3898d68fd7a06d516a3feb3f11e2403dc741b81
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 48915cf0
......@@ -351,7 +351,7 @@ aout_buffer_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
date_Init( &p_sys->end_date, p_sys->p_context->sample_rate, 1 );
if( p_block->i_pts != 0 &&
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 );
}
......
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