vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Wed May 2 17:01:53 2018 +0300| [4376ff929bcfa6e8a65f739282d0ca0e7f1dfc7a] | committer: Rémi Denis-Courmont
g711: fix invalid timestamps > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4376ff929bcfa6e8a65f739282d0ca0e7f1dfc7a --- modules/codec/g711.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/codec/g711.c b/modules/codec/g711.c index 6c41a062e4..0b4c2e85c2 100644 --- a/modules/codec/g711.c +++ b/modules/codec/g711.c @@ -202,7 +202,7 @@ static int DecoderOpen( vlc_object_t *p_this ) p_sys->table = table; 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 ); return VLC_SUCCESS; } @@ -211,7 +211,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 ); } static int DecodeBlock( decoder_t *p_dec, block_t *p_block ) @@ -231,12 +231,12 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block ) } } - 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. */ block_Release( p_block ); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
