1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

estimate_timings_from_pts: Also consider packet duration

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Gaullier Nicolas 2014-05-14 16:25:13 +00:00 committed by Michael Niedermayer
parent 85349d8d00
commit 5d944f58db

View File

@ -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