lavf/wavdec: add sanity check for AVCodecContext.channels

Fixes ticket #3862.
As a side effect, this also fixes aac_latm in wav.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>