Commit ed2797ee authored by michael's avatar michael

Fix rounding direction for calculation of AVPacket.duration.

Fixes issue1579


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22802 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b47fd064
......@@ -886,7 +886,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
if (pkt->duration == 0) {
compute_frame_duration(&num, &den, st, pc, pkt);
if (den && num) {
pkt->duration = av_rescale(1, num * (int64_t)st->time_base.den, den * (int64_t)st->time_base.num);
pkt->duration = av_rescale_rnd(1, num * (int64_t)st->time_base.den, den * (int64_t)st->time_base.num, AV_ROUND_DOWN);
if(pkt->duration != 0 && s->packet_buffer)
update_initial_durations(s, st, pkt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment