[vlc-commits] avcodec audio decoder: stricter PTS output

Rafaël Carré git at videolan.org
Wed Apr 24 16:09:17 CEST 2013


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Tue Apr 23 18:27:18 2013 +0200| [a3898d68fd7a06d516a3feb3f11e2403dc741b81] | committer: Rafaël Carré

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a3898d68fd7a06d516a3feb3f11e2403dc741b81
---

 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 );
     }



More information about the vlc-commits mailing list