avcodec: do not allocate unused output buffers
avcodec: do not allocate unused output buffers

The buffer from decoder_NewAudioBuffer() was only used if the audio
output format was planar. Now it is allocated only in that case.

This also remove leaks when decoder_NewAudioBuffer() failed.

vlc-mirror/vlc,vlc-mirror/vlc,jomanmuk/vlc-2.2,vlc-mirror/vlc,krichter722/vlc,krichter722/vlc,shyamalschandra/vlc,shyamalschandra/vlc,xkfz007/vlc,xkfz007/vlc,krichter722/vlc,jomanmuk/vlc-2.2,jomanmuk/vlc-2.2,jomanmuk/vlc-2.2,xkfz007/vlc,jomanmuk/vlc-2.2,xkfz007/vlc,krichter722/vlc,jomanmuk/vlc-2.2,xkfz007/vlc,vlc-mirror/vlc,vlc-mirror/vlc,shyamalschandra/vlc,shyamalschandra/vlc,krichter722/vlc,vlc-mirror/vlc,vlc-mirror/vlc,shyamalschandra/vlc,krichter722/vlc,jomanmuk/vlc-2.2,xkfz007/vlc,shyamalschandra/vlc,shyamalschandra/vlc,xkfz007/vlc,krichter722/vlc