Commit 9933c328 authored by j's avatar j

use fabs for float values

svn path=/trunk/vorbis-tools/; revision=10543
parent fa5358c1
......@@ -355,12 +355,12 @@ static void theora_process(stream_processor *stream, ogg_page *page)
{
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment