summaryrefslogtreecommitdiff
path: root/libavformat/avienc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/avienc.c')
-rw-r--r--libavformat/avienc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index fb2cdd2077..5396a7d577 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -409,7 +409,7 @@ static int avi_write_header(AVFormatContext *s)
avio_wl32(pb, 0); // video format = unknown
avio_wl32(pb, 0); // video standard = unknown
// TODO: should be avg_frame_rate
- avio_wl32(pb, lrintf(1.0 / av_q2d(st->time_base)));
+ avio_wl32(pb, (2LL*st->time_base.den + st->time_base.num - 1) / (2LL * st->time_base.num));
avio_wl32(pb, enc->width);
avio_wl32(pb, enc->height);
avio_wl16(pb, den);