[vlc-devel] [PATCH] avcodec audio decoder: stricter PTS output

Rafaël Carré funman at videolan.org
Tue Apr 23 18:29:03 CEST 2013


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 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index bae8a89..bf63157 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -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 );
     }
-- 
1.7.10.4



More information about the vlc-devel mailing list