[xiph-commits] r10543 - trunk/vorbis-tools/ogginfo

j at svn.xiph.org j at svn.xiph.org
Mon Dec 5 16:30:55 PST 2005


Author: j
Date: 2005-12-05 16:30:54 -0800 (Mon, 05 Dec 2005)
New Revision: 10543

Modified:
   trunk/vorbis-tools/ogginfo/ogginfo2.c
Log:
use fabs for float values

Modified: trunk/vorbis-tools/ogginfo/ogginfo2.c
===================================================================
--- trunk/vorbis-tools/ogginfo/ogginfo2.c	2005-12-05 22:20:45 UTC (rev 10542)
+++ trunk/vorbis-tools/ogginfo/ogginfo2.c	2005-12-06 00:30:54 UTC (rev 10543)
@@ -355,12 +355,12 @@
 		{
 		    float frameaspect = (float)inf->ti.frame_width/(float)inf->ti.frame_height * (float)inf->ti.aspect_numerator/(float)inf->ti.aspect_denominator; 
 		    info(_("Pixel aspect ratio %d:%d (1:%f)\n"), inf->ti.aspect_numerator, inf->ti.aspect_denominator, (float)inf->ti.aspect_numerator/(float)inf->ti.aspect_denominator);
-                    if(abs(frameaspect - 4.0/3.0) < 0.02)
+                    if(fabs(frameaspect - 4.0/3.0) < 0.02)
 			info(_("Frame aspect 4:3\n"));
-                    else if(abs(frameaspect - 16.0/9.0) < 0.02)
+                    else if(fabs(frameaspect - 16.0/9.0) < 0.02)
 			info(_("Frame aspect 16:9\n"));
 		    else
-			info(_("Frame aspect 1:%d\n"), frameaspect);
+			info(_("Frame aspect 1:%f\n"), frameaspect);
 		}
 
 		if(inf->ti.colorspace == OC_CS_ITU_REC_470M)



More information about the commits mailing list