AEEncoderFFmpeg: switch to avcodec_encode_audio2 and convert input audio to a format...
authorAlexis Ballier <aballier@gentoo.org>
Thu, 25 Apr 2013 15:15:15 +0000 (17:15 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Mon, 29 Apr 2013 12:31:01 +0000 (14:31 +0200)
commit72f283684ce917984006c1a5f1c4e5a4c9e34144
tree8e6ab845afb2fec80b8cd990834dae2996c00be3
parentc20e395e573eb614e91913cbcac648c50eb43d43
AEEncoderFFmpeg: switch to avcodec_encode_audio2 and convert input audio to a format accepted by the encoder if AE does not handle it. Fixes transcoding to AC3 for passthrough (e.g. HDMI).

Without this, with ffmpeg 1.1 and later, xbmc segfaults when trying to transcode
to AC3.

It would be better to have AE to support planar formats but this fallback will be useful in case there are even other audio formats introduced in FFmpeg and is simpler for now.
xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp
xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h