Commit 3d014b19 authored by Mats Erik Andersson's avatar Mats Erik Andersson Committed by Thomas Daede

Floating point comparison fails.

Last-Update: 2011-07-20
Forwarded: no

In checking the quality setting, the program `oggenc'
performs a floating point comparison after down scaling
the given value to a tenth. This causes the inexact
internal representation to complain unnecessarily.
It is better to compare first, and normalize later,
since quality 10 is top notch!
parent c60fd5d4
......@@ -905,12 +905,12 @@ static void parse_options(int argc, char **argv, oe_options *opt)
opt->quality *= 0.1;
if(opt->quality > 1.0f)
if(opt->quality > 10.0f)
opt->quality = 1.0f;
opt->quality = 10.0f;
fprintf(stderr, _("WARNING: quality setting too high, setting to maximum quality.\n"));
opt->quality *= 0.1;
case 'n':
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