[vlc-commits] avcodec audio decoder: use VLC_TS_INVALID

Rafaël Carré git at videolan.org
Fri Jan 11 00:55:19 CET 2013


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Fri Jan 11 00:50:36 2013 +0100| [77c7992e47593c5e847a11e97f4e33218cca175e] | committer: Rafaël Carré

avcodec audio decoder: use VLC_TS_INVALID

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

 modules/codec/avcodec/audio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index 4aa4bfc..75c7d63 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -303,7 +303,7 @@ block_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
     }
 
     /* We've just started the stream, wait for the first PTS. */
-    if( !date_Get( &p_sys->end_date ) && !p_block->i_pts )
+    if( !date_Get( &p_sys->end_date ) && p_block->i_pts <= VLC_TS_INVALID )
         goto end;
 
     if( p_block->i_buffer <= 0 )
@@ -371,7 +371,7 @@ block_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
     /* **** Set audio output parameters **** */
     SetupOutputFormat( p_dec, true );
 
-    if( p_block->i_pts != 0 &&
+    if( p_block->i_pts > VLC_TS_INVALID &&
         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