audio, libav: support planar Libav audio formats
commit91a18f3998323b6d9b0ef67b4c1865d40fabfaf8
authorAnton Khirnov <anton@khirnov.net>
Tue, 23 Oct 2012 17:43:26 +0000 (23 19:43 +0200)
committerUoti Urpala <uau@mplayer2.org>
Sat, 3 Nov 2012 01:03:15 +0000 (3 03:03 +0200)
tree410f8c23366923028f9508edb6ecae77101f0d28
parentabdf82a392ab1b23ecb413187143f20bdf2486a8
audio, libav: support planar Libav audio formats

Latest Libav versions have changed some decoders to support only
planar audio sample formats, which are not natively supported by
mplayer2 code. Add code (using libavresample) to convert libavcodec
decoder output to a supported format if needed. Add similar conversion
in the other direction to af_lavcac3enc (the ac3 encoder requires
planar input in latest Libav).

Libavresample support is optional and tested separately from the other
Libav libraries in configure. Libavresample is only included with the
latest Libav git versions. Older Libav versions do not include it, but
work fine without it, as older libavcodec does not use planar formats
and so does not require the conversion functionality.
configure
libaf/af_lavcac3enc.c
libmpcodecs/ad_ffmpeg.c