Originally committed as revision 21942 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -67,7 +67,7 @@ static char *value_string(char *buf, int buf_size, double val, const char *unit) · 66 unmodified lines | ||
| 67 | 67 | int index; |
| 68 | 68 | |
| 69 | 69 | if (unit == unit_byte_str && use_byte_value_binary_prefix) { |
| 70 | − index = (int) (log2(val)) / 10; | |
| 70 | + index = (int) (log(val)/log(2)) / 10; | |
| 71 | 71 | index = av_clip(index, 0, FF_ARRAY_ELEMS(binary_unit_prefixes) -1); |
| 72 | 72 | val /= pow(2, index*10); |
| 73 | 73 | prefix_string = binary_unit_prefixes[index]; |