avcodec/aacenc: check input for NaN

Fixes Ticket3762

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/aacdec: Skip processing channel elements which have not been present

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>