Package: alsa-plugins
Version: 1.0.25-2
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu raring ubuntu-patch

Dear Maintainer,
*** /tmp/tmpUwNg72/bug_body

In Ubuntu, I have updated the a52 plugin to use a newer API of libav. It
should work with both libav 0.8 in wheezy and 9 in experimental

Thanks for considering the patch.


-- System Information:
Debian Release: wheezy/sid
  APT prefers quantal-updates
  APT policy: (500, 'quantal-updates'), (500, 'quantal-security'), (500, 
'quantal-proposed'), (500, 'quantal'), (100, 'quantal-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.5.0-18-generic (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru alsa-plugins-1.0.25/debian/changelog alsa-plugins-1.0.25/debian/changelog
diff -Nru alsa-plugins-1.0.25/debian/control alsa-plugins-1.0.25/debian/control
--- alsa-plugins-1.0.25/debian/control	2012-11-07 00:47:06.000000000 +0100
+++ alsa-plugins-1.0.25/debian/control	2012-11-07 17:08:24.000000000 +0100
@@ -1,8 +1,7 @@
 Source: alsa-plugins
 Section: libs
 Priority: optional
-Maintainer: Ubuntu Developers <[email protected]>
-XSBC-Original-Maintainer: Debian ALSA Maintainers <[email protected]>
+Maintainer: Debian ALSA Maintainers <[email protected]>
 Uploaders: Jordi Mallach <[email protected]>,
            Elimar Riesebieter <[email protected]>
 Build-Depends: autotools-dev,
diff -Nru alsa-plugins-1.0.25/debian/patches/fix-ftbfs-libav9.patch alsa-plugins-1.0.25/debian/patches/fix-ftbfs-libav9.patch
--- alsa-plugins-1.0.25/debian/patches/fix-ftbfs-libav9.patch	1970-01-01 01:00:00.000000000 +0100
+++ alsa-plugins-1.0.25/debian/patches/fix-ftbfs-libav9.patch	2012-11-07 16:58:11.000000000 +0100
@@ -0,0 +1,58 @@
+Author: Reinhard Tartler <[email protected]>
+Description: Update to newer libav API - compatible to libav 0.8 and libav 9
+
+Index: alsa-plugins-1.0.25/a52/pcm_a52.c
+===================================================================
+--- alsa-plugins-1.0.25.orig/a52/pcm_a52.c	2012-11-07 15:37:01.000000000 +0000
++++ alsa-plugins-1.0.25/a52/pcm_a52.c	2012-11-07 15:55:22.789201740 +0000
+@@ -27,6 +27,8 @@
+ #include <alsa/pcm_plugin.h>
+ #include AVCODEC_HEADER
+ #include <libavutil/avutil.h>
++#include <libavutil/audioconvert.h>
++#include <libavutil/mem.h>
+ 
+ struct a52_ctx {
+ 	snd_pcm_ioplug_t io;
+@@ -430,7 +432,7 @@
+ 
+ 	a52_free(rec);
+ 
+-	rec->avctx = avcodec_alloc_context();
++	rec->avctx = avcodec_alloc_context3(rec->codec);
+ 	if (! rec->avctx)
+ 		return -ENOMEM;
+ 
+@@ -445,20 +447,20 @@
+ #if LIBAVCODEC_VERSION_MAJOR > 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 3)
+ 	switch (io->channels) {
+ 	case 2:
+-		rec->avctx->channel_layout = CH_LAYOUT_STEREO;
++		rec->avctx->channel_layout = AV_CH_LAYOUT_STEREO;
+ 		break;
+ 	case 4:
+-		rec->avctx->channel_layout = CH_LAYOUT_QUAD;
++		rec->avctx->channel_layout = AV_CH_LAYOUT_QUAD;
+ 		break;
+ 	case 6:
+-		rec->avctx->channel_layout = CH_LAYOUT_5POINT1;
++		rec->avctx->channel_layout = AV_CH_LAYOUT_5POINT1;
+ 		break;
+ 	default:
+ 		break;
+ 	}
+ #endif
+ 
+-	if (avcodec_open(rec->avctx, rec->codec) < 0)
++	if (avcodec_open2(rec->avctx, rec->codec, NULL) < 0)
+ 		return -EINVAL;
+ 
+ 	rec->inbuf = malloc(rec->avctx->frame_size * 2 * io->channels);
+@@ -703,7 +705,6 @@
+ 	rec->channels = channels;
+ 	rec->format = format;
+ 
+-	avcodec_init();
+ 	avcodec_register_all();
+ 
+ 	rec->codec = avcodec_find_encoder_by_name("ac3_fixed");
diff -Nru alsa-plugins-1.0.25/debian/patches/series alsa-plugins-1.0.25/debian/patches/series
--- alsa-plugins-1.0.25/debian/patches/series	2012-11-07 00:47:06.000000000 +0100
+++ alsa-plugins-1.0.25/debian/patches/series	2012-11-07 16:37:55.000000000 +0100
@@ -1,3 +1,4 @@
 arcam-av_uses_pthreads.patch
 use_libavutil.patch
 usb_stream-Fix-build-with-glibc-2.16.patch
+fix-ftbfs-libav9.patch

Reply via email to