commit 415f4256626be314b1a705ea5162978a37a8748d
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Wed Jul 27 10:47:46 2022 +0100
Fix ffmpeg-5.1 build issue
ffmpeg51.patch | 33 +++++++++++++++++++++++++++++++++
mpd.spec | 1 +
2 files changed, 34 insertions(+)
---
diff --git a/ffmpeg51.patch b/ffmpeg51.patch
new file mode 100644
index 0000000..f645c00
--- /dev/null
+++ b/ffmpeg51.patch
@@ -0,0 +1,33 @@
+From 59792cb0b801854ee41be72d33db9542735df754 Mon Sep 17 00:00:00 2001
+From: Max Kellermann <max.kellermann(a)gmail.com>
+Date: Wed, 27 Jul 2022 10:59:48 +0200
+Subject: [PATCH] decoder/ffmpeg: wrap FFmpeg include in "extern C"
+
+Commit ebae25d175eb31 added that #include, but forgot to wrap it in
+"extern C", so the linker tried to look up C++ symbols, causing linker
+failure.
+
+Closes
https://github.com/MusicPlayerDaemon/MPD/issues/1582
+---
+ src/decoder/plugins/FfmpegIo.cxx | 5 ++++-
+ 1 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/decoder/plugins/FfmpegIo.cxx b/src/decoder/plugins/FfmpegIo.cxx
+index 2e22d95991..5b5c8b40e3 100644
+--- a/src/decoder/plugins/FfmpegIo.cxx
++++ b/src/decoder/plugins/FfmpegIo.cxx
+@@ -21,10 +21,13 @@
+ #define __STDC_CONSTANT_MACROS
+
+ #include "FfmpegIo.hxx"
+-#include "libavutil/mem.h"
+ #include "../DecoderAPI.hxx"
+ #include "input/InputStream.hxx"
+
++extern "C" {
++#include <libavutil/mem.h>
++}
++
+ AvioStream::~AvioStream()
+ {
+ if (io != nullptr) {
diff --git a/mpd.spec b/mpd.spec
index d287a5f..f26ab22 100644
--- a/mpd.spec
+++ b/mpd.spec
@@ -35,6 +35,7 @@ Source5: mpd.xml
Patch0: mpd-0.22-mpdconf.patch
Patch1: mpd-0.20-remove_NoNewPrivileges.patch
Patch2: timidity_path.patch
+Patch3:
https://github.com/MusicPlayerDaemon/MPD/commit/59792cb0b801854ee41be72d3...
BuildRequires: alsa-lib-devel
BuildRequires: audiofile-devel