[FFmpeg-cvslog] r21942 - trunk/ffprobe.c

reimar subversion
Sun Feb 21 17:24:05 CET 2010


Author: reimar
Date: Sun Feb 21 17:24:05 2010
New Revision: 21942

Log:
Avoid using log2, it is not available everywhere.
Should fix compilation on FreeBSD.

Modified:
   trunk/ffprobe.c

Modified: trunk/ffprobe.c
==============================================================================
--- trunk/ffprobe.c	Sun Feb 21 16:29:17 2010	(r21941)
+++ trunk/ffprobe.c	Sun Feb 21 17:24:05 2010	(r21942)
@@ -67,7 +67,7 @@ static char *value_string(char *buf, int
         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-cvslog mailing list