[FFmpeg-cvslog] r21485 - trunk/libavformat/utils.c
michael
subversion
Wed Jan 27 20:37:52 CET 2010
Author: michael
Date: Wed Jan 27 20:37:52 2010
New Revision: 21485
Log:
Fix duration calculation in the presence of a single wraping of the timeline.
Fixes issue1714.
Modified:
trunk/libavformat/utils.c
Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c Wed Jan 27 20:13:35 2010 (r21484)
+++ trunk/libavformat/utils.c Wed Jan 27 20:37:52 2010 (r21485)
@@ -1823,6 +1823,8 @@ static void av_estimate_timings_from_pts
start_time[pkt->stream_index] != AV_NOPTS_VALUE) {
end_time = pkt->pts;
duration = end_time - start_time[pkt->stream_index];
+ if (duration < 0)
+ duration += 1LL<<st->pts_wrap_bits;
if (duration > 0) {
if (st->duration == AV_NOPTS_VALUE ||
st->duration < duration)
More information about the ffmpeg-cvslog
mailing list