commit 251040b242f2c515f132355c1e428788a220f5eb
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Wed Nov 15 17:05:19 2023 +0000
Add patch to fix fedora ffmpeg broken ABI change
ffmpeg-chromium.patch | 46 ++++++++++++++++++++++++++++++++++++++++++++++
ffmpeg.spec | 7 ++++++-
2 files changed, 52 insertions(+), 1 deletion(-)
---
diff --git a/ffmpeg-chromium.patch b/ffmpeg-chromium.patch
new file mode 100644
index 0000000..2160609
--- /dev/null
+++ b/ffmpeg-chromium.patch
@@ -0,0 +1,46 @@
+From d32aacab65a322b66d6a1b48f6cdb03e42bde0f9 Mon Sep 17 00:00:00 2001
+From: Frank Liberato <liberato(a)chromium.org>
+Date: Wed, 7 Jul 2021 19:01:22 -0700
+Subject: [PATCH] Add av_stream_get_first_dts for Chromium
+
+---
+ libavformat/avformat.h | 4 ++++
+ libavformat/utils.c | 7 +++++++
+ 2 files changed, 11 insertions(+)
+
+diff --git a/libavformat/avformat.h b/libavformat/avformat.h
+index 1916aa2dc5..e6682849fa 100644
+--- a/libavformat/avformat.h
++++ b/libavformat/avformat.h
+@@ -1019,6 +1019,10 @@ attribute_deprecated
+ int64_t av_stream_get_end_pts(const AVStream *st);
+ #endif
+
++// Chromium: We use the internal field first_dts vvv
++int64_t av_stream_get_first_dts(const AVStream *st);
++// Chromium: We use the internal field first_dts ^^^
++
+ #define AV_PROGRAM_RUNNING 1
+
+ /**
+diff --git a/libavformat/utils.c b/libavformat/utils.c
+index cf4d68bff9..7d750abf88 100644
+--- a/libavformat/utils.c
++++ b/libavformat/utils.c
+@@ -55,6 +55,13 @@ int ff_unlock_avformat(void)
+ return ff_mutex_unlock(&avformat_mutex) ? -1 : 0;
+ }
+
++// Chromium: We use the internal field first_dts vvv
++int64_t av_stream_get_first_dts(const AVStream *st)
++{
++ return cffstream(st)->first_dts;
++}
++// Chromium: We use the internal field first_dts ^^^
++
+ /* an arbitrarily chosen "sane" max packet size -- 50M */
+ #define SANE_CHUNK_SIZE (50000000)
+
+--
+2.41.0
+
diff --git a/ffmpeg.spec b/ffmpeg.spec
index b0d25aa..5b9e66e 100644
--- a/ffmpeg.spec
+++ b/ffmpeg.spec
@@ -112,7 +112,7 @@ ExclusiveArch: armv7hnl
Summary: Digital VCR and streaming server
Name: ffmpeg%{?flavor}
Version: 6.0.1
-Release: 1%{?date:.%{?date}%{?date:git}%{?rel}}%{?dist}
+Release: 2%{?date:.%{?date}%{?date:git}%{?rel}}%{?dist}
License: %{ffmpeg_license}
URL:
https://ffmpeg.org/
%if 0%{?date}
@@ -127,6 +127,8 @@ Patch1:
0001-avfilter-vf_libplacebo-remove-deprecated-field.patch
# Backport fix for segfault when passing non-existent filter option
# See:
https://bugzilla.rpmfusion.org/show_bug.cgi?id=6773
Patch2: 0001-fftools-ffmpeg_filter-initialize-the-o-to-silence-th.patch
+# We don't endorse adding this patch but fedora insists on breaking the ffmpeg ABI
+Patch3: ffmpeg-chromium.patch
Conflicts: %{name}-free
Provides: %{name}-bin = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@@ -535,6 +537,9 @@ strip %{buildroot}%{_libdir}/%{name}/libavcodec.so.*
%changelog
+* Wed Nov 15 2023 Leigh Scott <leigh123linux(a)gmail.com> - 6.0.1-2
+- Add patch to fix fedora ffmpeg brokenABI change
+
* Fri Nov 10 2023 Leigh Scott <leigh123linux(a)gmail.com> - 6.0.1-1
- Update to 6.0.1 release