commit 2da3fa39210c693947bb828acd212494becea8c3
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Feb 25 13:54:08 2022 +0000
Fix broken ffmpeg check
fix_ffmpeg5.patch | 13 +++++++++++++
hardened-build.patch | 4 ++--
loudgain.spec | 3 ++-
3 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/fix_ffmpeg5.patch b/fix_ffmpeg5.patch
new file mode 100644
index 0000000..23c845d
--- /dev/null
+++ b/fix_ffmpeg5.patch
@@ -0,0 +1,13 @@
+--- a/src/scan.c~ 2019-09-06 16:31:19.000000000 +0100
++++ b/src/scan.c 2022-02-25 13:33:06.186080276 +0000
+@@ -69,8 +69,9 @@ int scan_init(unsigned nb_files) {
+ * It is now useless
+ *
https://github.com/FFmpeg/FFmpeg/blob/70d25268c21cbee5f08304da95be1f647c6...
+ */
+- if (avformat_version() < AV_VERSION_INT(58,9,100))
++#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58,9,100)
+ av_register_all();
++#endif
+
+ av_log_set_callback(scan_av_log);
+
diff --git a/hardened-build.patch b/hardened-build.patch
index 5c3d10f..c362797 100644
--- a/hardened-build.patch
+++ b/hardened-build.patch
@@ -1,5 +1,5 @@
---- CMakeLists.txt~ 2019-09-06 16:31:19.000000000 +0100
-+++ CMakeLists.txt 2020-10-18 00:09:05.591898486 +0100
+--- a/CMakeLists.txt~ 2019-09-06 16:31:19.000000000 +0100
++++ b/CMakeLists.txt 2020-10-18 00:09:05.591898486 +0100
@@ -72,9 +72,9 @@
COMPILE_FLAGS "-Wall -pedantic -g"
)
diff --git a/loudgain.spec b/loudgain.spec
index 50730bf..ce341f0 100644
--- a/loudgain.spec
+++ b/loudgain.spec
@@ -11,6 +11,7 @@ Source0: %{forgesource}
#
https://github.com/Moonbase59/loudgain/pull/37
Patch0: hardened-build.patch
+Patch1: fix_ffmpeg5.patch
BuildRequires: cmake
BuildRequires: gcc-c++
@@ -28,7 +29,7 @@ modify the actual audio data.
%prep
-%forgeautosetup
+%forgeautosetup -p1
%build