Skip to content
Snippets Groups Projects
Commit 17264cd2 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avformat/avienc: Avoid float usage


reduces risk for rounding differences between platforms

Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 3bf57acb
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment