[FFmpeg-cvslog] estimate_timings_from_pts: Also consider packet duration

Gaullier Nicolas git at videolan.org
Fri May 16 16:59:09 CEST 2014


ffmpeg | branch: master | Gaullier Nicolas <nicolas.gaullier at arkena.com> | Wed May 14 16:25:13 2014 +0000| [5d944f58db99d9481321a924fde62c1df385adca] | committer: Michael Niedermayer

estimate_timings_from_pts: Also consider packet duration

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d944f58db99d9481321a924fde62c1df385adca
---

 libavformat/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index fd717b1..10ffb84 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2515,7 +2515,7 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
             if (pkt->pts != AV_NOPTS_VALUE &&
                 (st->start_time != AV_NOPTS_VALUE ||
                  st->first_dts  != AV_NOPTS_VALUE)) {
-                duration = end_time = pkt->pts;
+                duration = end_time = pkt->pts + pkt->duration;
                 if (st->start_time != AV_NOPTS_VALUE)
                     duration -= st->start_time;
                 else



More information about the ffmpeg-cvslog mailing list