06f66f3120
Add comparison check so that NaN is caught. Comparisons with NaN always result in false. NaNs cause problems later in audio encoder. Note: may break with -ffast-math compiler flag. Fixes #4885.