1
Author: Reinhard Tartler <siretart@ubuntu.com>
2
Description: Update to newer libav API - compatible to libav 0.8 and libav 9
4
Index: alsa-plugins-1.0.25/a52/pcm_a52.c
5
===================================================================
6
--- alsa-plugins-1.0.25.orig/a52/pcm_a52.c 2012-11-07 15:37:01.000000000 +0000
7
+++ alsa-plugins-1.0.25/a52/pcm_a52.c 2012-11-07 15:55:22.789201740 +0000
9
#include <alsa/pcm_plugin.h>
10
#include AVCODEC_HEADER
11
#include <libavutil/avutil.h>
12
+#include <libavutil/audioconvert.h>
13
+#include <libavutil/mem.h>
21
- rec->avctx = avcodec_alloc_context();
22
+ rec->avctx = avcodec_alloc_context3(rec->codec);
27
#if LIBAVCODEC_VERSION_MAJOR > 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 3)
28
switch (io->channels) {
30
- rec->avctx->channel_layout = CH_LAYOUT_STEREO;
31
+ rec->avctx->channel_layout = AV_CH_LAYOUT_STEREO;
34
- rec->avctx->channel_layout = CH_LAYOUT_QUAD;
35
+ rec->avctx->channel_layout = AV_CH_LAYOUT_QUAD;
38
- rec->avctx->channel_layout = CH_LAYOUT_5POINT1;
39
+ rec->avctx->channel_layout = AV_CH_LAYOUT_5POINT1;
46
- if (avcodec_open(rec->avctx, rec->codec) < 0)
47
+ if (avcodec_open2(rec->avctx, rec->codec, NULL) < 0)
50
rec->inbuf = malloc(rec->avctx->frame_size * 2 * io->channels);
52
rec->channels = channels;
56
avcodec_register_all();
58
rec->codec = avcodec_find_encoder_by_name("ac3_fixed");