The old check would fail on huge but not infinite values and the later code could then fail to handle them correctly in some cases. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>