diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-04-04 22:19:42 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-04-04 22:19:42 +0000 |
commit | 0e1f78f90b7114abd6537cac6d2351450869dbaa (patch) | |
tree | f8fd504f7a950bd8ca1a2e198d21d1675ca4c580 /libavformat/utils.c | |
parent | 3370289a4c159ae6734ca1d85d2ded7d93e0eaf4 (diff) | |
download | ffmpeg-0e1f78f90b7114abd6537cac6d2351450869dbaa.tar.gz |
Fix rounding direction for calculation of AVPacket.duration.
Fixes issue1579
Originally committed as revision 22802 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 0cb5e4702e..5f9feec500 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -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); |