Commit 3f87b149 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

araw: fix invalid timestamps

parent ca9f1e94
......@@ -299,7 +299,7 @@ static int DecoderOpen( vlc_object_t *p_this )
assert( p_sys->framebits );
date_Init( &p_sys->end_date, p_dec->fmt_out.audio.i_rate, 1 );
date_Set( &p_sys->end_date, 0 );
date_Set( &p_sys->end_date, VLC_TS_INVALID );
p_dec->pf_decode = DecodeBlock;
p_dec->pf_flush = Flush;
......@@ -315,7 +315,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 );
}
/****************************************************************************
......@@ -336,12 +336,12 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
goto skip;
}
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 );
}
else if( !date_Get( &p_sys->end_date ) )
else if( date_Get( &p_sys->end_date ) == VLC_TS_INVALID )
/* We've just started the stream, wait for the first PTS. */
goto skip;
......
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