1 |
From f28b72e4cee90b273132b9371224357d57571c96 Mon Sep 17 00:00:00 2001 |
2 |
From: Alexis Ballier <aballier@gentoo.org> |
3 |
Date: Sat, 14 Apr 2012 14:31:49 -0300 |
4 |
Subject: [PATCH 144/145] Use libavutil::av_get_default_channel_layout instead |
5 |
of the private |
6 |
libavcodec::avcodec_guess_channel_layout |
7 |
|
8 |
The latter has been removed in ffmpeg git master. |
9 |
(cherry picked from commit 2dd610e26fa69ea2d57a2227448a6713b75efbbf) |
10 |
--- |
11 |
xbmc/cdrip/EncoderFFmpeg.cpp | 2 +- |
12 |
xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp | 2 +- |
13 |
2 files changed, 2 insertions(+), 2 deletions(-) |
14 |
|
15 |
diff --git a/xbmc/cdrip/EncoderFFmpeg.cpp b/xbmc/cdrip/EncoderFFmpeg.cpp |
16 |
index bcedb0c..23ba054 100644 |
17 |
--- a/xbmc/cdrip/EncoderFFmpeg.cpp |
18 |
+++ b/xbmc/cdrip/EncoderFFmpeg.cpp |
19 |
@@ -106,7 +106,7 @@ bool CEncoderFFmpeg::Init(const char* strFile, int iInChannels, int iInRate, int |
20 |
m_CodecCtx->bit_rate = m_Format->bit_rate; |
21 |
m_CodecCtx->sample_rate = iInRate; |
22 |
m_CodecCtx->channels = iInChannels; |
23 |
- m_CodecCtx->channel_layout = m_dllAvCodec.avcodec_guess_channel_layout(iInChannels, codec->id, NULL); |
24 |
+ m_CodecCtx->channel_layout = m_dllAvUtil.av_get_default_channel_layout(iInChannels); |
25 |
m_CodecCtx->time_base = (AVRational){1, iInRate}; |
26 |
|
27 |
if(fmt->flags & AVFMT_GLOBALHEADER) |
28 |
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp |
29 |
index 46fd47f..e6601c7 100644 |
30 |
--- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp |
31 |
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp |
32 |
@@ -279,7 +279,7 @@ void CDVDAudioCodecFFmpeg::BuildChannelMap() |
33 |
else |
34 |
{ |
35 |
CLog::Log(LOGINFO, "CDVDAudioCodecFFmpeg::GetChannelMap - FFmpeg reported %d channels, but the layout contains %d ignoring", m_pCodecContext->channels, bits); |
36 |
- layout = m_dllAvCodec.avcodec_guess_channel_layout(m_pCodecContext->channels, m_pCodecContext->codec_id, NULL); |
37 |
+ layout = m_dllAvUtil.av_get_default_channel_layout(m_pCodecContext->channels); |
38 |
} |
39 |
|
40 |
int index = 0; |
41 |
-- |
42 |
1.7.10 |
43 |
|