~ubuntu-branches/ubuntu/trusty/alsa-plugins/trusty

« back to all changes in this revision

Viewing changes to debian/patches/fix-ftbfs-libav9.patch

  • Committer: Package Import Robot
  • Author(s): Luke Yelavich
  • Date: 2013-07-26 10:57:49 UTC
  • mfrom: (3.1.16 sid)
  • Revision ID: package-import@ubuntu.com-20130726105749-ymn7cpbi75gmgplw
Tags: 1.0.27-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Create libasound2-plugins-extra package which contains plugins that use
    libav.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Author: Reinhard Tartler <siretart@ubuntu.com>
2
 
Description: Update to newer libav API - compatible to libav 0.8 and libav 9
3
 
 
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
8
 
@@ -27,6 +27,8 @@
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>
14
 
 
15
 
 struct a52_ctx {
16
 
        snd_pcm_ioplug_t io;
17
 
@@ -430,7 +432,7 @@
18
 
 
19
 
        a52_free(rec);
20
 
 
21
 
-       rec->avctx = avcodec_alloc_context();
22
 
+       rec->avctx = avcodec_alloc_context3(rec->codec);
23
 
        if (! rec->avctx)
24
 
                return -ENOMEM;
25
 
 
26
 
@@ -445,20 +447,20 @@
27
 
 #if LIBAVCODEC_VERSION_MAJOR > 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 3)
28
 
        switch (io->channels) {
29
 
        case 2:
30
 
-               rec->avctx->channel_layout = CH_LAYOUT_STEREO;
31
 
+               rec->avctx->channel_layout = AV_CH_LAYOUT_STEREO;
32
 
                break;
33
 
        case 4:
34
 
-               rec->avctx->channel_layout = CH_LAYOUT_QUAD;
35
 
+               rec->avctx->channel_layout = AV_CH_LAYOUT_QUAD;
36
 
                break;
37
 
        case 6:
38
 
-               rec->avctx->channel_layout = CH_LAYOUT_5POINT1;
39
 
+               rec->avctx->channel_layout = AV_CH_LAYOUT_5POINT1;
40
 
                break;
41
 
        default:
42
 
                break;
43
 
        }
44
 
 #endif
45
 
 
46
 
-       if (avcodec_open(rec->avctx, rec->codec) < 0)
47
 
+       if (avcodec_open2(rec->avctx, rec->codec, NULL) < 0)
48
 
                return -EINVAL;
49
 
 
50
 
        rec->inbuf = malloc(rec->avctx->frame_size * 2 * io->channels);
51
 
@@ -703,7 +705,6 @@
52
 
        rec->channels = channels;
53
 
        rec->format = format;
54
 
 
55
 
-       avcodec_init();
56
 
        avcodec_register_all();
57
 
 
58
 
        rec->codec = avcodec_find_encoder_by_name("ac3_fixed");