From 84995ec730da5a8f4e116f85d31175baf4d3c5db Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Sat, 15 May 2004 10:52:56 +0000 Subject: [PATCH] * all: use 1 as starting time (allow to have a valid date for the first frame). --- modules/demux/aac.c | 2 +- modules/demux/au.c | 4 ++-- modules/demux/mkv.cpp | 4 ++-- modules/demux/rawdv.c | 2 +- modules/demux/wav.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/demux/aac.c b/modules/demux/aac.c index 3ae6bf6112..90830b8838 100644 --- a/modules/demux/aac.c +++ b/modules/demux/aac.c @@ -135,7 +135,7 @@ static int Open( vlc_object_t * p_this ) p_demux->pf_control = Control; p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) ); - p_sys->i_time = 0; + p_sys->i_time = 1; /* peek the begining (10 is for adts header) */ if( stream_Peek( p_demux->s, &p_peek, 10 ) < 10 ) diff --git a/modules/demux/au.c b/modules/demux/au.c index b73ed5ae44..0a76b279a9 100644 --- a/modules/demux/au.c +++ b/modules/demux/au.c @@ -2,7 +2,7 @@ * au.c : au file input module for vlc ***************************************************************************** * Copyright (C) 2001-2003 VideoLAN - * $Id: au.c,v 1.14 2004/03/03 11:40:19 fenrir Exp $ + * $Id$ * * Authors: Laurent Aimar * @@ -131,7 +131,7 @@ static int Open( vlc_object_t *p_this ) } p_sys = p_demux->p_sys = malloc( sizeof( demux_sys_t ) ); - p_sys->i_time = 0; + p_sys->i_time = 1; p_sys->i_header_size = GetDWBE( &hdr[0] ); /* skip extra header data */ diff --git a/modules/demux/mkv.cpp b/modules/demux/mkv.cpp index 6ced401083..bc0d4dcae8 100644 --- a/modules/demux/mkv.cpp +++ b/modules/demux/mkv.cpp @@ -1654,7 +1654,7 @@ static void Seek( demux_t *p_demux, mtime_t i_date, int i_percent) return; } - p_sys->i_pts = block->GlobalTimecode() * (mtime_t) 1000 / p_sys->i_timescale; + p_sys->i_pts = block->GlobalTimecode() * (mtime_t) 1000 / p_sys->i_timescale + 1; for( i_track = 0; i_track < p_sys->i_track; i_track++ ) { @@ -1709,7 +1709,7 @@ static int Demux( demux_t *p_demux) return 0; } - p_sys->i_pts = block->GlobalTimecode() * (mtime_t) 1000 / p_sys->i_timescale; + p_sys->i_pts = block->GlobalTimecode() * (mtime_t) 1000 / p_sys->i_timescale + 1; if( p_sys->i_pts > 0 ) { diff --git a/modules/demux/rawdv.c b/modules/demux/rawdv.c index 6508579bee..f50c0a56c1 100644 --- a/modules/demux/rawdv.c +++ b/modules/demux/rawdv.c @@ -203,7 +203,7 @@ static int Open( vlc_object_t * p_this ) p_sys->frame_size = dv_header.dsf ? 12 * 150 * 80 : 10 * 150 * 80; p_sys->f_rate = dv_header.dsf ? 25 : 29.97; - p_sys->i_pcr = 0; + p_sys->i_pcr = 1; p_sys->p_es_video = NULL; p_sys->p_es_audio = NULL; diff --git a/modules/demux/wav.c b/modules/demux/wav.c index 82ae935559..acae370d47 100644 --- a/modules/demux/wav.c +++ b/modules/demux/wav.c @@ -100,7 +100,7 @@ static int Open( vlc_object_t * p_this ) p_demux->pf_control = Control; p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) ); p_sys->p_es = NULL; - p_sys->i_time = 0; + p_sys->i_time = 1; /* skip riff header */ stream_Read( p_demux->s, NULL, 12 ); /* cannot fail as peek succeed */ -- 2.39.5