From 24cf458e4d3cecec35264c16b030461f0a47fab7 Mon Sep 17 00:00:00 2001 From: jbeich Date: Fri, 4 May 2018 11:40:59 +0000 Subject: 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) --- audio/forked-daapd/Makefile | 2 -- audio/forked-daapd/files/patch-ffmpeg4 | 43 ++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 audio/forked-daapd/files/patch-ffmpeg4 (limited to 'audio') 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 + #include +-#include + #include + #include + #include +@@ -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) -- cgit