]> git.sesse.net Git - vlc/commitdiff
avcodec audio decoder: stricter PTS output
authorRafaël Carré <funman@videolan.org>
Tue, 23 Apr 2013 16:27:18 +0000 (18:27 +0200)
committerRafaël Carré <funman@videolan.org>
Wed, 24 Apr 2013 13:54:50 +0000 (15:54 +0200)
Only trust demuxer PTS if it is higher than what we expected
Fix demuxers that send several packets with identical PTS
Close #8453

modules/codec/avcodec/audio.c

index bae8a89e8dad8e6a43cb66f6af7fd116dbdbe959..bf63157a9d88bd2d99ad074857ad564faaebc285 100644 (file)
@@ -316,7 +316,7 @@ block_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
         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 ) )
+        p_block->i_pts > date_Get( &p_sys->end_date ) )
     {
         date_Set( &p_sys->end_date, p_block->i_pts );
     }