Package: cmus Version: 2.7.1-1 Severity: important Tags: patch User: pkg-multimedia-maintain...@lists.alioth.debian.org Usertags: ffmpeg2.9
Dear Maintainer, your package fails to build with the upcoming version of ffmpeg, which is planned to be released this month (and will be called 2.9 or 3.0). This bug will become release-critical at some point when this ffmpeg 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..c67c49c --- /dev/null +++ b/debian/patches/ffmpeg-2.9.patch @@ -0,0 +1,69 @@ +Description: Replace deprecated FFmpeg API +Author: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> +Last-Update: <2016-01-09> + +--- cmus-2.7.1.orig/ffmpeg.c ++++ cmus-2.7.1/ffmpeg.c +@@ -39,7 +39,7 @@ + #include <libavformat/avio.h> + #include <libswresample/swresample.h> + #include <libavutil/opt.h> +-#include <libavutil/audioconvert.h> ++#include <libavutil/channel_layout.h> + #ifndef AVUTIL_MATHEMATICS_H + #include <libavutil/mathematics.h> + #endif +@@ -235,7 +235,7 @@ static int ffmpeg_open(struct input_plug + + codec = avcodec_find_decoder(cc->codec_id); + if (!codec) { +- d_print("codec not found: %d, %s\n", cc->codec_id, cc->codec_name); ++ d_print("codec not found: %d, %s\n", cc->codec_id, avcodec_get_name(cc->codec_id)); + err = -IP_ERROR_UNSUPPORTED_FILE_TYPE; + break; + } +@@ -248,7 +248,7 @@ static int ffmpeg_open(struct input_plug + #else + if (avcodec_open2(cc, codec, NULL) < 0) { + #endif +- d_print("could not open codec: %d, %s\n", cc->codec_id, cc->codec_name); ++ d_print("could not open codec: %d, %s\n", cc->codec_id, avcodec_get_name(cc->codec_id)); + err = -IP_ERROR_UNSUPPORTED_FILE_TYPE; + break; + } +@@ -347,7 +347,7 @@ static int ffmpeg_fill_buffer(AVFormatCo + struct ffmpeg_output *output, SwrContext *swr) + { + #if (LIBAVCODEC_VERSION_INT >= ((53<<16) + (25<<8) + 0)) +- AVFrame *frame = avcodec_alloc_frame(); ++ AVFrame *frame = av_frame_alloc(); + int got_frame; + #endif + while (1) { +@@ -363,7 +363,7 @@ static int ffmpeg_fill_buffer(AVFormatCo + if (av_read_frame(ic, &input->pkt) < 0) { + /* Force EOF once we can read no longer. */ + #if (LIBAVCODEC_VERSION_INT >= ((53<<16) + (25<<8) + 0)) +- avcodec_free_frame(&frame); ++ av_frame_free(&frame); + #endif + return 0; + } +@@ -426,7 +426,7 @@ static int ffmpeg_fill_buffer(AVFormatCo + res = 0; + output->buffer_pos = output->buffer; + output->buffer_used_len = res * cc->channels * sizeof(int16_t); +- avcodec_free_frame(&frame); ++ av_frame_free(&frame); + return output->buffer_used_len; + } + #endif +@@ -566,7 +566,7 @@ static long ffmpeg_current_bitrate(struc + long bitrate = -1; + #if (LIBAVFORMAT_VERSION_INT > ((51<<16)+(43<<8)+0)) + /* ape codec returns silly numbers */ +- if (priv->codec->id == CODEC_ID_APE) ++ if (priv->codec->id == AV_CODEC_ID_APE) + return -1; + #endif + if (priv->input->curr_duration > 0) { diff --git a/debian/patches/series b/debian/patches/series index c2cfb69..cb3676a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 01_config.mk.diff 02_link_avcodec.patch 11-fix_modplug_detection.patch +ffmpeg-2.9.patch