Fix compilation when libavresample is not installed (Ubuntu) or AVCodecID is defined (new libavcodec)

If resampling is required but libavresample is not available, sound
will not be played!
Fix audio decoding when using avcodec_decode_audio2