[FFmpeg-devel] [PATCH] fix ffprobe compilation

Reimar Döffinger Reimar.Doeffinger
Sun Feb 21 16:51:10 CET 2010


no need to use log2 here
Index: ffprobe.c
===================================================================
--- ffprobe.c	(revision 21941)
+++ ffprobe.c	(working copy)
@@ -67,7 +67,7 @@
         int index;
 
         if (unit == unit_byte_str && use_byte_value_binary_prefix) {
-            index = (int) (log2(val)) / 10;
+            index = (int) (log(val)/log(2)) / 10;
             index = av_clip(index, 0, FF_ARRAY_ELEMS(binary_unit_prefixes) -1);
             val /= pow(2, index*10);
             prefix_string = binary_unit_prefixes[index];




More information about the ffmpeg-devel mailing list