summaryrefslogtreecommitdiff
path: root/staging/alsa-plugins/alsa-plugins-1.0.25-ffmpeg-0.11-renamed-CH_LAYOUT-defs-v2.patch
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-06-10 00:04:00 +0000
committerroot <root@rshg054.dnsready.net>2012-06-10 00:04:00 +0000
commit7b2739f21a7ed0d52497fa381c9a2383e71ab7a8 (patch)
treee92096f88e034d79e6f814971f98eb098c0abd80 /staging/alsa-plugins/alsa-plugins-1.0.25-ffmpeg-0.11-renamed-CH_LAYOUT-defs-v2.patch
parent0c7e29df5c6742895884a0bbcf86381f8e601782 (diff)
Sun Jun 10 00:04:00 UTC 2012
Diffstat (limited to 'staging/alsa-plugins/alsa-plugins-1.0.25-ffmpeg-0.11-renamed-CH_LAYOUT-defs-v2.patch')
-rw-r--r--staging/alsa-plugins/alsa-plugins-1.0.25-ffmpeg-0.11-renamed-CH_LAYOUT-defs-v2.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/staging/alsa-plugins/alsa-plugins-1.0.25-ffmpeg-0.11-renamed-CH_LAYOUT-defs-v2.patch b/staging/alsa-plugins/alsa-plugins-1.0.25-ffmpeg-0.11-renamed-CH_LAYOUT-defs-v2.patch
new file mode 100644
index 000000000..f4ebbf466
--- /dev/null
+++ b/staging/alsa-plugins/alsa-plugins-1.0.25-ffmpeg-0.11-renamed-CH_LAYOUT-defs-v2.patch
@@ -0,0 +1,29 @@
+Ffmpeg 0.11 (LIBAVCODEC_VERSION_MAJOR = 54) removed the CH_LAYOUT_* aliases for
+the AV_CH_LAYOUT_* defines.
+
+diff -pru alsa-plugins-1.0.25-original/a52/pcm_a52.c alsa-plugins-1.0.25-for-ffmpeg-0.11/a52/pcm_a52.c
+--- alsa-plugins-1.0.25-original/a52/pcm_a52.c 2012-01-25 08:57:07.000000000 +0100
++++ alsa-plugins-1.0.25-for-ffmpeg-0.11/a52/pcm_a52.c 2012-06-01 14:59:47.096671464 +0200
+@@ -441,7 +441,21 @@ static int a52_prepare(snd_pcm_ioplug_t
+ #else
+ rec->avctx->sample_fmt = SAMPLE_FMT_S16;
+ #endif
+-#if LIBAVCODEC_VERSION_MAJOR > 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 3)
++#if (LIBAVCODEC_VERSION_MAJOR >= 54)
++ switch (io->channels) {
++ case 2:
++ rec->avctx->channel_layout = AV_CH_LAYOUT_STEREO;
++ break;
++ case 4:
++ rec->avctx->channel_layout = AV_CH_LAYOUT_QUAD;
++ break;
++ case 6:
++ rec->avctx->channel_layout = AV_CH_LAYOUT_5POINT1;
++ break;
++ default:
++ break;
++ }
++#elif (LIBAVCODEC_VERSION_MAJOR > 52 && LIBAVCODEC_VERSION_MAJOR < 54) || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 3)
+ switch (io->channels) {
+ case 2:
+ rec->avctx->channel_layout = CH_LAYOUT_STEREO;