[vlc-devel] commit: Workaround VLC_TS_INVALID being 0 in avformat demuxer. ( Laurent Aimar )

git version control git at videolan.org
Mon Dec 21 00:02:29 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Dec 19 10:23:57 2009 +0100| [9eb8bcb1acd6c5e010289ed66acbdc6b5cdeb88d] | committer: Laurent Aimar 

Workaround VLC_TS_INVALID being 0 in avformat demuxer.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9eb8bcb1acd6c5e010289ed66acbdc6b5cdeb88d
---

 modules/demux/avformat/demux.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 4370bbf..3bce8e0 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 /




More information about the vlc-devel mailing list