commit 2dd610e26fa69ea2d57a2227448a6713b75efbbf Author: Alexis Ballier Date: Sat Apr 14 14:31:49 2012 -0300 Use libavutil::av_get_default_channel_layout instead of the private libavcodec::avcodec_guess_channel_layout The latter has been removed in ffmpeg git master. diff --git a/xbmc/cdrip/EncoderFFmpeg.cpp b/xbmc/cdrip/EncoderFFmpeg.cpp index bcedb0c..23ba054 100644 --- a/xbmc/cdrip/EncoderFFmpeg.cpp +++ b/xbmc/cdrip/EncoderFFmpeg.cpp @@ -106,7 +106,7 @@ bool CEncoderFFmpeg::Init(const char* strFile, int iInChannels, int iInRate, int m_CodecCtx->bit_rate = m_Format->bit_rate; m_CodecCtx->sample_rate = iInRate; m_CodecCtx->channels = iInChannels; - m_CodecCtx->channel_layout = m_dllAvCodec.avcodec_guess_channel_layout(iInChannels, codec->id, NULL); + m_CodecCtx->channel_layout = m_dllAvUtil.av_get_default_channel_layout(iInChannels); m_CodecCtx->time_base = (AVRational){1, iInRate}; if(fmt->flags & AVFMT_GLOBALHEADER) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp index 9a2b166..c55c392 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp @@ -279,7 +279,7 @@ void CDVDAudioCodecFFmpeg::BuildChannelMap() else { CLog::Log(LOGINFO, "CDVDAudioCodecFFmpeg::GetChannelMap - FFmpeg reported %d channels, but the layout contains %d ignoring", m_pCodecContext->channels, bits); - layout = m_dllAvCodec.avcodec_guess_channel_layout(m_pCodecContext->channels, m_pCodecContext->codec_id, NULL); + layout = m_dllAvUtil.av_get_default_channel_layout(m_pCodecContext->channels); } int index = 0;