aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2018-05-04 19:40:59 +0800
committerjbeich <jbeich@FreeBSD.org>2018-05-04 19:40:59 +0800
commit24cf458e4d3cecec35264c16b030461f0a47fab7 (patch)
treec3d7224cb5b8ac7b3fa25f6f77b14cfca63e55d5 /audio
parent2af8dacbf4873a82a85afecc5fb8df6e07efd6e0 (diff)
downloadfreebsd-ports-gnome-24cf458e4d3cecec35264c16b030461f0a47fab7.tar.gz
freebsd-ports-gnome-24cf458e4d3cecec35264c16b030461f0a47fab7.tar.zst
freebsd-ports-gnome-24cf458e4d3cecec35264c16b030461f0a47fab7.zip
audio/forked-daapd: unbreak with ffmpeg 4.0
artwork.c:448:19: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER' dst->flags |= CODEC_FLAG_GLOBAL_HEADER; ^ transcode.c:29:10: fatal error: 'libavfilter/avfiltergraph.h' file not found ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ transcode.c:562:76: error: use of undeclared identifier 'CODEC_CAP_DELAY' if (!(ctx->ofmt_ctx->streams[stream_index]->codec->codec->capabilities & CODEC_CAP_DELAY)) ^ transcode.c:807:20: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER' enc_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER; ^ PR: 227726 Reported by: antoine (via exp-run)
Diffstat (limited to 'audio')
-rw-r--r--audio/forked-daapd/Makefile2
-rw-r--r--audio/forked-daapd/files/patch-ffmpeg443
2 files changed, 43 insertions, 2 deletions
diff --git a/audio/forked-daapd/Makefile b/audio/forked-daapd/Makefile
index 04cf1120cb83..488a0c7de609 100644
--- a/audio/forked-daapd/Makefile
+++ b/audio/forked-daapd/Makefile
@@ -12,8 +12,6 @@ COMMENT= DAAP (iTunes), MPD (Music Player Daemon) and RSP (Roku) media server
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
-BROKEN= fails to build with ffmpeg 4.0
-
BUILD_DEPENDS= antlr3:devel/antlr3
LIB_DEPENDS= libantlr3c.so:devel/libantlr3c \
libavahi-client.so:net/avahi-app \
diff --git a/audio/forked-daapd/files/patch-ffmpeg4 b/audio/forked-daapd/files/patch-ffmpeg4
new file mode 100644
index 000000000000..728615ca17f5
--- /dev/null
+++ b/audio/forked-daapd/files/patch-ffmpeg4
@@ -0,0 +1,43 @@
+https://github.com/ejurgensen/forked-daapd/commit/5afed60a42fe
+https://github.com/ejurgensen/forked-daapd/commit/e7f888645fd6
+https://github.com/ejurgensen/forked-daapd/commit/eec98e3b7e88
+
+--- src/artwork.c.orig 2016-05-06 17:50:14 UTC
++++ src/artwork.c
+@@ -445,7 +445,7 @@ artwork_rescale(struct evbuffer *evbuf, AVFormatContex
+ avcodec_get_context_defaults3(dst, NULL);
+
+ if (dst_fmt->flags & AVFMT_GLOBALHEADER)
+- dst->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ dst->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+
+ dst->codec_id = dst_fmt->video_codec;
+ dst->codec_type = AVMEDIA_TYPE_VIDEO;
+--- src/transcode.c.orig 2016-05-06 17:50:14 UTC
++++ src/transcode.c
+@@ -26,7 +26,6 @@
+
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+-#include <libavfilter/avfiltergraph.h>
+ #include <libavfilter/buffersink.h>
+ #include <libavfilter/buffersrc.h>
+ #include <libavutil/opt.h>
+@@ -560,7 +559,7 @@ flush_encoder(struct encode_ctx *ctx, unsigned int str
+
+ DPRINTF(E_DBG, L_XCODE, "Flushing output stream #%u encoder\n", stream_index);
+
+- if (!(ctx->ofmt_ctx->streams[stream_index]->codec->codec->capabilities & CODEC_CAP_DELAY))
++ if (!(ctx->ofmt_ctx->streams[stream_index]->codec->codec->capabilities & AV_CODEC_CAP_DELAY))
+ return;
+
+ do
+@@ -804,7 +803,7 @@ open_output(struct encode_ctx *ctx, struct decode_ctx
+ }
+
+ if (ctx->ofmt_ctx->oformat->flags & AVFMT_GLOBALHEADER)
+- enc_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ enc_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ }
+
+ // Notice, this will not write WAV header (so we do that manually)