From d5f52c2f3359ff934c472e244af62a3677c9519d Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 5 Dec 2012 01:03:37 +0100 Subject: [PATCH] alsa-plugins: add patch (BLFS) to fix build with ffmpeg>=0.11. --- .../alsa-plugins-1.0.26-ffmpeg-1.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 srcpkgs/alsa-plugins/patches/alsa-plugins-1.0.26-ffmpeg-1.patch diff --git a/srcpkgs/alsa-plugins/patches/alsa-plugins-1.0.26-ffmpeg-1.patch b/srcpkgs/alsa-plugins/patches/alsa-plugins-1.0.26-ffmpeg-1.patch new file mode 100644 index 0000000000..868c16f391 --- /dev/null +++ b/srcpkgs/alsa-plugins/patches/alsa-plugins-1.0.26-ffmpeg-1.patch @@ -0,0 +1,40 @@ +Submitted By: Armin K. +Date: 2012-06-11 +Initial Package Version: 1.0.25 +Upstream Status: Unknown +Origin: Archlinux +Description: Fixes building against FFMpeg 0.11.1. + +--- a52/pcm_a52.c 2012-01-25 08:57:07.000000000 +0100 ++++ a52/pcm_a52.c 2012-06-11 19:37:16.703490336 +0200 +@@ -441,7 +441,21 @@ + #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; +@@ -702,7 +716,6 @@ + rec->channels = channels; + rec->format = format; + +- avcodec_init(); + avcodec_register_all(); + + rec->codec = avcodec_find_encoder_by_name("ac3_fixed");