[vlc-commits] cdg: use VLC_TS_0, do not send VLC_TS_INVALID
Rémi Denis-Courmont
git at videolan.org
Fri May 4 12:40:08 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri May 4 13:33:11 2018 +0300| [96e7e418645dd6ce2b34ee60b1161b906b127e88] | committer: Rémi Denis-Courmont
cdg: use VLC_TS_0, do not send VLC_TS_INVALID
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=96e7e418645dd6ce2b34ee60b1161b906b127e88
---
modules/demux/cdg.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules/demux/cdg.c b/modules/demux/cdg.c
index 268eaab01a..d682d6f4b8 100644
--- a/modules/demux/cdg.c
+++ b/modules/demux/cdg.c
@@ -100,7 +100,6 @@ static int Open( vlc_object_t * p_this )
/* There is CDG_FRAME_RATE frames per second */
date_Init( &p_sys->pts, CDG_FRAME_RATE, 1 );
- date_Set( &p_sys->pts, 0 );
p_demux->pf_demux = Demux;
p_demux->pf_control = Control;
@@ -132,13 +131,13 @@ static int Demux( demux_t *p_demux )
i_date = vlc_stream_Tell( p_demux->s ) / CDG_FRAME_SIZE * i_delta;
if( i_date >= date_Get( &p_sys->pts ) + i_delta )
{
- p_block->i_dts = p_block->i_pts = i_date;
+ p_block->i_dts = p_block->i_pts = VLC_TS_0 + i_date;
date_Set( &p_sys->pts, i_date );
}
else
{
- p_block->i_dts = i_date;
- p_block->i_pts = date_Get( &p_sys->pts );
+ p_block->i_dts = VLC_TS_0 + i_date;
+ p_block->i_pts = VLC_TS_0 + date_Get( &p_sys->pts );
}
es_out_SetPCR( p_demux->out, p_block->i_pts );
More information about the vlc-commits
mailing list