X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fdemux%2Fcdg.c;h=9d9c0454dea3a52418fe228dbf3a3382a05638e0;hb=fb279135cd71565c84ae291c33419a3696d651c9;hp=4b6e59d4400afa1613f1174ad79c8270eae4a832;hpb=52c18c4dec68158eedd655e0502820b7d7b6128f;p=vlc diff --git a/modules/demux/cdg.c b/modules/demux/cdg.c index 4b6e59d440..9d9c0454de 100644 --- a/modules/demux/cdg.c +++ b/modules/demux/cdg.c @@ -33,8 +33,6 @@ #include #include -#include - /***************************************************************************** * Module descriptor *****************************************************************************/ @@ -102,7 +100,7 @@ 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, 1 ); + date_Set( &p_sys->pts, 0 ); return VLC_SUCCESS; } @@ -125,11 +123,14 @@ static int Demux( demux_t *p_demux ) } p_block->i_dts = - p_block->i_pts = date_Increment( &p_sys->pts, 1 ); + p_block->i_pts = VLC_TS_0 + date_Get( &p_sys->pts ); es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts ); es_out_Send( p_demux->out, p_sys->p_es, p_block ); + + date_Increment( &p_sys->pts, 1 ); + return 1; }