From 697ffd06bde0bfa3d3dde6fb4ec0d45de0576665 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Tue, 24 Apr 2018 13:56:52 +0000 Subject: [PATCH] audio/cmus: unbreak with ffmpeg 4.0 checking for FFMPEG_LIBS (pkg-config)... -L/usr/local/lib -lavformat -lavcodec checking for FFMPEG_CFLAGS (pkg-config)... -I/usr/local/include checking for header ... yes checking for successful build of ffmpeg.c... no [...] ip/ffmpeg.c:255:29: error: use of undeclared identifier 'CODEC_CAP_TRUNCATED' if (codec->capabilities & CODEC_CAP_TRUNCATED) ^ ip/ffmpeg.c:256:17: error: use of undeclared identifier 'CODEC_FLAG_TRUNCATED' cc->flags |= CODEC_FLAG_TRUNCATED; ^ PR: 227726 Obtained from: upstream (via Greg V) --- audio/cmus/files/patch-ip_ffmpeg.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 audio/cmus/files/patch-ip_ffmpeg.c diff --git a/audio/cmus/files/patch-ip_ffmpeg.c b/audio/cmus/files/patch-ip_ffmpeg.c new file mode 100644 index 000000000000..1d284089d5be --- /dev/null +++ b/audio/cmus/files/patch-ip_ffmpeg.c @@ -0,0 +1,15 @@ +https://github.com/cmus/cmus/commit/b595b8cd7fee + +--- ip/ffmpeg.c.orig 2016-11-20 12:29:46 UTC ++++ ip/ffmpeg.c +@@ -252,8 +252,8 @@ static int ffmpeg_open(struct input_plugin_data *ip_da + break; + } + +- if (codec->capabilities & CODEC_CAP_TRUNCATED) +- cc->flags |= CODEC_FLAG_TRUNCATED; ++ if (codec->capabilities & AV_CODEC_CAP_TRUNCATED) ++ cc->flags |= AV_CODEC_FLAG_TRUNCATED; + + #if (LIBAVCODEC_VERSION_INT < ((53<<16)+(8<<8)+0)) + if (avcodec_open(cc, codec) < 0) {