tags 632128 patch
user [email protected]
usertags 632128 ubuntu-patch oneiric
thanks

On Wed, Jun 29, 2011 at 08:23:01PM +0200, Reinhard Tartler wrote:
> After a quick rebuild test it turns out that aqualung needs uses
> deprecated Libav/FFmpeg APIs. Since Libav has cleaned up old APIs,
> aqualung fails to build now.
> 
> Libav 0.7 is currently in debian experimental, but will soon be
> uploaded to unstable.

Here's a patch:

  * Port to libav 0.7 API.

diff -u aqualung-0.9~beta11/debian/control aqualung-0.9~beta11/debian/control
--- aqualung-0.9~beta11/debian/control
+++ aqualung-0.9~beta11/debian/control
@@ -3,7 +3,7 @@
 Priority: extra
 Maintainer: Ubuntu Developers <[email protected]>
 XSBC-Original-Maintainer: Adam Cécile (Le_Vert) <[email protected]>
-Build-Depends: debhelper (>= 5), autotools-dev, libgtk2.0-dev (>= 2.6), 
libxml2-dev, libasound2-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386] | 
libasound-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libjack-dev, 
libsamplerate0-dev | libsamplerate-dev, libsndfile1-dev (>= 1.0.12) | 
libsndfile-dev (>= 1.0.12), libflac-dev, libvorbis-dev, libmodplug-dev (>= 
0.8), libmpcdec-dev, liboggz2-dev | liboggz-dev, libspeex-dev, libmad0-dev, 
liblrdf0-dev (>= 0.4.0) | liblrdf-dev (>= 0.4.0), libcddb2-dev | libcddb-dev 
(>= 1.2.1), libusb-dev (>= 1.2.1), libifp-dev, libwavpack-dev (>= 4.40.0), 
libavformat-dev, libcdio-paranoia-dev (>= 0.76), imagemagick, dpatch, 
libpulse-dev, liblua5.1-0-dev | liblua5.1-dev, libmp3lame-dev
+Build-Depends: debhelper (>= 5), autotools-dev, libgtk2.0-dev (>= 2.6), 
libxml2-dev, libasound2-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386] | 
libasound-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libjack-dev, 
libsamplerate0-dev | libsamplerate-dev, libsndfile1-dev (>= 1.0.12) | 
libsndfile-dev (>= 1.0.12), libflac-dev, libvorbis-dev, libmodplug-dev (>= 
0.8), libmpcdec-dev, liboggz2-dev | liboggz-dev, libspeex-dev, libmad0-dev, 
liblrdf0-dev (>= 0.4.0) | liblrdf-dev (>= 0.4.0), libcddb2-dev | libcddb-dev 
(>= 1.2.1), libusb-dev (>= 1.2.1), libifp-dev, libwavpack-dev (>= 4.40.0), 
libavformat-dev (>= 4:0.7), libcdio-paranoia-dev (>= 0.76), imagemagick, 
dpatch, libpulse-dev, liblua5.1-0-dev | liblua5.1-dev, libmp3lame-dev
 Standards-Version: 3.8.4
 Homepage: http://aqualung.sourceforge.net/
 
diff -u aqualung-0.9~beta11/debian/patches/00list 
aqualung-0.9~beta11/debian/patches/00list
--- aqualung-0.9~beta11/debian/patches/00list
+++ aqualung-0.9~beta11/debian/patches/00list
@@ -4,0 +5 @@
+005_libav-0.7
only in patch2:
unchanged:
--- aqualung-0.9~beta11.orig/debian/patches/005_libav-0.7.dpatch
+++ aqualung-0.9~beta11/debian/patches/005_libav-0.7.dpatch
@@ -0,0 +1,37 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 005_libav-api.dpatch by Colin Watson <[email protected]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Port to the current libav API.
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
aqualung-0.9~beta11~/src/decoder/dec_lavc.c 
aqualung-0.9~beta11/src/decoder/dec_lavc.c
+--- aqualung-0.9~beta11~/src/decoder/dec_lavc.c        2009-08-20 
19:11:11.000000000 +0100
++++ aqualung-0.9~beta11/src/decoder/dec_lavc.c 2011-08-18 18:24:13.000000000 
+0100
+@@ -53,7 +53,7 @@
+ 
+       if (packet.stream_index == pd->audioStream) {
+ 
+-              avcodec_decode_audio2(pd->avCodecCtx, samples, &n_bytes, 
packet.data, packet.size);
++              avcodec_decode_audio3(pd->avCodecCtx, samples, &n_bytes, 
&packet);
+               if (n_bytes > 0) {
+                       int i;
+                       for (i = 0; i < n_bytes/2; i++) {
+@@ -111,7 +111,7 @@
+       file_decoder_t * fdec = dec->fdec;
+       int i;
+ 
+-      if (av_open_input_file(&pd->avFormatCtx, filename, NULL, 0, NULL) != 0)
++      if (avformat_open_input(&pd->avFormatCtx, filename, NULL, NULL) != 0)
+               return DECODER_OPEN_BADLIB;
+ 
+       if (av_find_stream_info(pd->avFormatCtx) < 0)
+@@ -124,7 +124,7 @@
+ 
+       pd->audioStream = -1;
+       for (i = 0; i < pd->avFormatCtx->nb_streams; i++) {
+-              if (pd->avFormatCtx->streams[i]->codec->codec_type == 
CODEC_TYPE_AUDIO) {
++              if (pd->avFormatCtx->streams[i]->codec->codec_type == 
AVMEDIA_TYPE_AUDIO) {
+                       pd->audioStream = i;
+                       break;
+               }

Thanks,

-- 
Colin Watson                                       [[email protected]]



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to