summaryrefslogtreecommitdiff
path: root/media-sound/cmus/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-04-05 21:17:31 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-04-05 21:17:31 +0100
commitdc7cbdfa65fd814b3b9aa3c56257da201109e807 (patch)
treec85d72f6f31f21f178069c9d41d41a7c1ff4b362 /media-sound/cmus/files
parent0706fc6986773f4e4d391deff4ad5143c464ea4e (diff)
gentoo resync : 05.04.2019
Diffstat (limited to 'media-sound/cmus/files')
-rw-r--r--media-sound/cmus/files/cmus-2.8.0-elogind.patch22
-rw-r--r--media-sound/cmus/files/cmus-2.8.0-ffmpeg-deprecations.patch124
-rw-r--r--media-sound/cmus/files/cmus-2.8.0-opus.patch22
3 files changed, 168 insertions, 0 deletions
diff --git a/media-sound/cmus/files/cmus-2.8.0-elogind.patch b/media-sound/cmus/files/cmus-2.8.0-elogind.patch
new file mode 100644
index 000000000000..e1309c78911d
--- /dev/null
+++ b/media-sound/cmus/files/cmus-2.8.0-elogind.patch
@@ -0,0 +1,22 @@
+From 483d1862ed023c3e00f2c8c4e71da40022af2f78 Mon Sep 17 00:00:00 2001
+From: Shiba <3816409+shibotto@users.noreply.github.com>
+Date: Tue, 12 Feb 2019 15:29:43 +0100
+Subject: [PATCH] Add support for elogind (#846)
+
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 1f46c30a..4627126e 100755
+--- a/configure
++++ b/configure
+@@ -289,7 +289,7 @@ check_vorbis()
+
+ check_libsystemd()
+ {
+- pkg_config LIBSYSTEMD "libsystemd"
++ pkg_config LIBSYSTEMD "libsystemd" || pkg_config LIBSYSTEMD "libelogind >= 239.3"
+ return $?
+ }
+
diff --git a/media-sound/cmus/files/cmus-2.8.0-ffmpeg-deprecations.patch b/media-sound/cmus/files/cmus-2.8.0-ffmpeg-deprecations.patch
new file mode 100644
index 000000000000..941f47e3d499
--- /dev/null
+++ b/media-sound/cmus/files/cmus-2.8.0-ffmpeg-deprecations.patch
@@ -0,0 +1,124 @@
+From 9877eb02381fd4c57059f9c77be03127c28d8f88 Mon Sep 17 00:00:00 2001
+From: Niko E <nefthy@users.noreply.github.com>
+Date: Mon, 11 Feb 2019 09:09:21 +0100
+Subject: [PATCH] Fixes ffmpeg deprecations (#861)
+
+- av_register_all is no longer needed since 4.0
+- AVStream::codec is deprecated since 3.1
+- avcodec_decode_audio4 is deprecated since 3.1
+---
+ ip/ffmpeg.c | 42 ++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 42 insertions(+)
+
+diff --git a/ip/ffmpeg.c b/ip/ffmpeg.c
+index eaad5c4f..418a37f8 100644
+--- a/ip/ffmpeg.c
++++ b/ip/ffmpeg.c
+@@ -128,9 +128,11 @@ static void ffmpeg_init(void)
+
+ av_log_set_level(AV_LOG_QUIET);
+
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 18, 100)
+ /* We could register decoders explicitly to save memory, but we have to
+ * be careful about compatibility. */
+ av_register_all();
++#endif
+ }
+
+ static int ffmpeg_open(struct input_plugin_data *ip_data)
+@@ -143,6 +145,9 @@ static int ffmpeg_open(struct input_plugin_data *ip_data)
+ AVCodec *codec;
+ AVCodecContext *cc = NULL;
+ AVFormatContext *ic = NULL;
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101)
++ AVCodecParameters *cp = NULL;
++#endif
+ SwrContext *swr = NULL;
+
+ ffmpeg_init();
+@@ -162,11 +167,20 @@ static int ffmpeg_open(struct input_plugin_data *ip_data)
+ }
+
+ for (i = 0; i < ic->nb_streams; i++) {
++
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101)
++ cp = ic->streams[i]->codecpar;
++ if (cp->codec_type == AVMEDIA_TYPE_AUDIO) {
++ stream_index = i;
++ break;
++ }
++#else
+ cc = ic->streams[i]->codec;
+ if (cc->codec_type == AVMEDIA_TYPE_AUDIO) {
+ stream_index = i;
+ break;
+ }
++#endif
+ }
+
+ if (stream_index == -1) {
+@@ -175,7 +189,13 @@ static int ffmpeg_open(struct input_plugin_data *ip_data)
+ break;
+ }
+
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101)
++ codec = avcodec_find_decoder(cp->codec_id);
++ cc = avcodec_alloc_context3(codec);
++ avcodec_parameters_to_context(cc, cp);
++#else
+ codec = avcodec_find_decoder(cc->codec_id);
++#endif
+ if (!codec) {
+ d_print("codec not found: %d, %s\n", cc->codec_id, avcodec_get_name(cc->codec_id));
+ err = -IP_ERROR_UNSUPPORTED_FILE_TYPE;
+@@ -196,6 +216,9 @@ static int ffmpeg_open(struct input_plugin_data *ip_data)
+
+ if (err < 0) {
+ /* Clean up. cc is never opened at this point. (See above assumption.) */
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101)
++ avcodec_free_context(&cc);
++#endif
+ avformat_close_input(&ic);
+ return err;
+ }
+@@ -207,6 +230,9 @@ static int ffmpeg_open(struct input_plugin_data *ip_data)
+ priv->input = ffmpeg_input_create();
+ if (priv->input == NULL) {
+ avcodec_close(cc);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101)
++ avcodec_free_context(&cc);
++#endif
+ avformat_close_input(&ic);
+ free(priv);
+ return -IP_ERROR_INTERNAL;
+@@ -252,6 +278,9 @@ static int ffmpeg_close(struct input_plugin_data *ip_data)
+ struct ffmpeg_private *priv = ip_data->private;
+
+ avcodec_close(priv->codec_context);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101)
++ avcodec_free_context(&priv->codec_context);
++#endif
+ avformat_close_input(&priv->input_context);
+ swr_free(&priv->swr);
+ ffmpeg_input_free(priv->input);
+@@ -305,7 +334,20 @@ static int ffmpeg_fill_buffer(AVFormatContext *ic, AVCodecContext *cc, struct ff
+ AVPacket avpkt;
+ av_new_packet(&avpkt, input->curr_pkt_size);
+ memcpy(avpkt.data, input->curr_pkt_buf, input->curr_pkt_size);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101)
++ if (avcodec_send_packet(cc, &avpkt) == 0) {
++ got_frame = !avcodec_receive_frame(cc, frame);
++ if (got_frame)
++ len = input->curr_pkt_size;
++ else
++ len = 0;
++ } else {
++ got_frame = 0;
++ len = 0;
++ }
++#else
+ len = avcodec_decode_audio4(cc, frame, &got_frame, &avpkt);
++#endif
+ #if LIBAVCODEC_VERSION_MAJOR >= 56
+ av_packet_unref(&avpkt);
+ #else
diff --git a/media-sound/cmus/files/cmus-2.8.0-opus.patch b/media-sound/cmus/files/cmus-2.8.0-opus.patch
new file mode 100644
index 000000000000..ea95fa8536ce
--- /dev/null
+++ b/media-sound/cmus/files/cmus-2.8.0-opus.patch
@@ -0,0 +1,22 @@
+From 0be981476e019e9fddb5529a73aadf004e94656b Mon Sep 17 00:00:00 2001
+From: tomty89 <tom.ty89@gmail.com>
+Date: Tue, 12 Feb 2019 18:55:09 +0800
+Subject: [PATCH] ip/ffmpeg: enable opus support (#865)
+
+---
+ ip/ffmpeg.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ip/ffmpeg.c b/ip/ffmpeg.c
+index 04b916cc..427257c7 100644
+--- a/ip/ffmpeg.c
++++ b/ip/ffmpeg.c
+@@ -519,7 +519,7 @@ const int ip_priority = 30;
+ const char *const ip_extensions[] = {
+ "aa", "aac", "ac3", "aif", "aifc", "aiff", "ape", "au", "fla", "flac",
+ "m4a", "m4b", "mka", "mkv", "mp+", "mp2", "mp3", "mp4", "mpc", "mpp",
+- "ogg", "shn", "tak", "tta", "wav", "webm", "wma", "wv",
++ "ogg", "opus", "shn", "tak", "tta", "wav", "webm", "wma", "wv",
+ #ifdef USE_FALLBACK_IP
+ "*",
+ #endif