Commit 8c862efb authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

aes3: fix invalid timestamps

parent 7155cebc
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment