Commit d480b36d authored by Michael Niedermayer's avatar Michael Niedermayer

av_d2q: Avoid llrint(), its not correctly implemented in old netbsd

This should fix some fate failure
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 4703a345
...@@ -114,7 +114,7 @@ AVRational av_d2q(double d, int max) ...@@ -114,7 +114,7 @@ AVRational av_d2q(double d, int max)
return (AVRational) { d < 0 ? -1 : 1, 0 }; return (AVRational) { d < 0 ? -1 : 1, 0 };
exponent = FFMAX( (int)(log(fabs(d) + 1e-20)/LOG2), 0); exponent = FFMAX( (int)(log(fabs(d) + 1e-20)/LOG2), 0);
den = 1LL << (61 - exponent); den = 1LL << (61 - exponent);
av_reduce(&a.num, &a.den, llrint(d * den), den, max); av_reduce(&a.num, &a.den, rint(d * den), den, max);
return a; return a;
} }
......
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