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

Rafaël Carré git at videolan.org
Thu Apr 25 18:44:19 CEST 2013


vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Tue Apr 23 18:27:18 2013 +0200| [9defa225775870e73d6bd3ac65ddedf10460d0d8] | committer: 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: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 ecbbcad..e7050c7 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -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 );
     }



More information about the vlc-commits mailing list