[vlc-devel] commit: Fixed initial timestamp value in CDG demuxer. (Laurent Aimar )
git version control
git at videolan.org
Mon Dec 21 00:02:31 CET 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Dec 20 16:46:05 2009 +0100| [88f65af8a326de625e887912b4237fcd97482579] | committer: Laurent Aimar
Fixed initial timestamp value in CDG demuxer.
CDG demuxer is VLC_TS_INVALID compliant.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=88f65af8a326de625e887912b4237fcd97482579
---
modules/demux/cdg.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/demux/cdg.c b/modules/demux/cdg.c
index 4b6e59d..6cc401f 100644
--- a/modules/demux/cdg.c
+++ b/modules/demux/cdg.c
@@ -102,7 +102,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 +125,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;
}
More information about the vlc-devel
mailing list