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

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


This should fix some fate failure

Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 4703a345
No related branches found
No related tags found
No related merge requests found
...@@ -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;
} }
......
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