[vlc-commits] aes3: fix invalid timestamps

Rémi Denis-Courmont git at videolan.org
Wed May 2 18:14:54 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May  2 19:11:56 2018 +0300| [8c862efbe44efd241258347452df06407bef8400] | committer: Rémi Denis-Courmont

aes3: fix invalid timestamps

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

 modules/codec/aes3.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/codec/aes3.c b/modules/codec/aes3.c
index a7e2cbd91f..6acff6511e 100644
--- a/modules/codec/aes3.c
+++ b/modules/codec/aes3.c
@@ -231,7 +231,7 @@ static void Flush( decoder_t *p_dec )
 {
     decoder_sys_t *p_sys = p_dec->p_sys;
 
-    date_Set( &p_sys->end_date, 0 );
+    date_Set( &p_sys->end_date, VLC_TS_INVALID );
 }
 
 /*****************************************************************************
@@ -279,7 +279,7 @@ static int Open( decoder_t *p_dec, bool b_packetizer )
 
     /* Misc init */
     date_Init( &p_sys->end_date, 48000, 1 );
-    date_Set( &p_sys->end_date, 0 );
+    date_Set( &p_sys->end_date, VLC_TS_INVALID );
 
     /* Set output properties */
     p_dec->fmt_out.audio.i_rate = 48000;
@@ -340,13 +340,13 @@ static block_t * Parse( decoder_t *p_dec, int *pi_frame_length, int *pi_bits,
     }
 
     /* Date management */
-    if( p_block->i_pts > VLC_TS_INVALID &&
+    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 );
     }
 
-    if( !date_Get( &p_sys->end_date ) )
+    if( date_Get( &p_sys->end_date ) == VLC_TS_INVALID )
     {
         /* We've just started the stream, wait for the first PTS. */
         block_Release( p_block );



More information about the vlc-commits mailing list