Package: alsa-plugins
Version: 1.0.29-1
Severity: important
Tags: patch
User: [email protected]
Usertags: ffmpeg2.9

Dear Maintainer,

your package fails to build with the upcoming ffmpeg 2.9.
This bug will become release-critical at some point when the
ffmpeg2.9 transition gets closer.

Attached is a patch replacing the deprecated functionality.
It also works with ffmpeg 2.8.
Please apply this patch and forward it upstream, if necessary.

These changes have little regression potential.

Best regards,
Andreas

diff --git a/debian/patches/ffmpeg_2.9.patch b/debian/patches/ffmpeg_2.9.patch
new file mode 100644
index 0000000..dc55fb4
--- /dev/null
+++ b/debian/patches/ffmpeg_2.9.patch
@@ -0,0 +1,38 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun <[email protected]>
+Last-Update: <2015-11-02>
+
+--- alsa-plugins-1.0.29.orig/a52/pcm_a52.c
++++ alsa-plugins-1.0.29/a52/pcm_a52.c
+@@ -39,7 +39,7 @@
+ #endif
+ 
+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 34, 0)
+-#include <libavutil/audioconvert.h>
++#include <libavutil/channel_layout.h>
+ #include <libavutil/mem.h>
+ #define USE_AVCODEC_FRAME
+ #endif
+@@ -512,7 +512,9 @@ static void a52_free(struct a52_ctx *rec
+ 		av_freep(&rec->frame->data[0]);
+ 		rec->inbuf = NULL;
+ 	}
+-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0)
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 45, 101)
++	av_frame_free(&rec->frame);
++#elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0)
+ 	avcodec_free_frame(&rec->frame);
+ #else
+ 	av_freep(&rec->frame);
+@@ -557,7 +559,11 @@ static int alloc_input_buffer(snd_pcm_io
+ {
+ 	struct a52_ctx *rec = io->private_data;
+ #ifdef USE_AVCODEC_FRAME
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 45, 101)
++	rec->frame = av_frame_alloc();
++#else
+ 	rec->frame = avcodec_alloc_frame();
++#endif
+ 	if (!rec->frame)
+ 		return -ENOMEM;
+ 	if (av_samples_alloc(rec->frame->data, rec->frame->linesize,
diff --git a/debian/patches/series b/debian/patches/series
index 67e0584..19f4ddd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 arcam-av_uses_pthreads.patch
 libav10.patch
+ffmpeg_2.9.patch

Reply via email to