diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-10-21 01:00:31 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-10-21 01:00:31 +0000 |
commit | 33a6984b8c85bead476f9db24ecdcda6dae71a57 (patch) | |
tree | cede3b0e130e61bd93310f79abc62b8e26967de9 /libavcodec/rational.c | |
parent | 5c9e4723e054701a645673bb49328702bbc9e1cc (diff) | |
download | ffmpeg-33a6984b8c85bead476f9db24ecdcda6dae71a57.tar.gz |
BSD doesnt have log2
Originally committed as revision 2407 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/rational.c')
-rw-r--r-- | libavcodec/rational.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/rational.c b/libavcodec/rational.c index f2a579abca..92db8bbe3e 100644 --- a/libavcodec/rational.c +++ b/libavcodec/rational.c @@ -53,7 +53,7 @@ AVRational av_sub_q(AVRational b, AVRational c){ AVRational av_d2q(double d, int max){ AVRational a; - int exponent= FFMAX( (int)log2(ABS(d) + 1e-20), 0); + int exponent= FFMAX( (int)(log(ABS(d) + 1e-20)/log(2)), 0); int64_t den= 1LL << (61 - exponent); av_reduce(&a.num, &a.den, (int64_t)(d * den + 0.5), den, max); |