From 9eb8bcb1acd6c5e010289ed66acbdc6b5cdeb88d Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Sat, 19 Dec 2009 10:23:57 +0100 Subject: [PATCH] Workaround VLC_TS_INVALID being 0 in avformat demuxer. --- modules/demux/avformat/demux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c index 4370bbf248..3bce8e011c 100644 --- a/modules/demux/avformat/demux.c +++ b/modules/demux/avformat/demux.c @@ -448,11 +448,11 @@ static int Demux( demux_t *p_demux ) p_frame->i_dts = ( pkt.dts == (int64_t)AV_NOPTS_VALUE ) ? VLC_TS_INVALID : (pkt.dts) * 1000000 * p_stream->time_base.num / - p_stream->time_base.den - i_start_time; + p_stream->time_base.den - i_start_time + VLC_TS_0; p_frame->i_pts = ( pkt.pts == (int64_t)AV_NOPTS_VALUE ) ? VLC_TS_INVALID : (pkt.pts) * 1000000 * p_stream->time_base.num / - p_stream->time_base.den - i_start_time; + p_stream->time_base.den - i_start_time + VLC_TS_0; if( pkt.duration > 0 ) p_frame->i_length = pkt.duration * 1000000 * p_stream->time_base.num / -- 2.39.2