commit 3e020fd312946ee112f5c326c02c4d71ea6d1c43
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Tue Nov 9 12:22:21 2021 +0000
fix
ffmpeg45.patch | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vlc.spec | 3 +++
2 files changed, 68 insertions(+)
---
diff --git a/ffmpeg45.patch b/ffmpeg45.patch
new file mode 100644
index 0000000..8d76211
--- /dev/null
+++ b/ffmpeg45.patch
@@ -0,0 +1,65 @@
+From 21d5a1933275edb7f67d05ea62a762464e07c2cb Mon Sep 17 00:00:00 2001
+From: Alexandre Janniaux <ajanni(a)videolabs.io>
+Date: Wed, 8 Apr 2020 15:07:15 +0200
+Subject: [PATCH] avcodec: remove deprecation warning for av*_register_all
+
+From doc/APIchanges:
+
+ 2018-02-06 - 0694d87024 - lavf 58.9.100 - avformat.h
+ Deprecate use of av_register_input_format(), av_register_output_format(),
+ av_register_all(), av_iformat_next(), av_oformat_next().
+ Add av_demuxer_iterate(), and av_muxer_iterate().
+
+ 2018-02-06 - 36c85d6e77 - lavc 58.10.100 - avcodec.h
+ Deprecate use of avcodec_register(), avcodec_register_all(),
+ av_codec_next(), av_register_codec_parser(), and av_parser_next().
+ Add av_codec_iterate() and av_parser_iterate().
+
+They are no-op since those updates. If compiling with a recent release,
+just don't call av*_register_all to prevent warnings.
+---
+ modules/codec/avcodec/avcommon.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h
+index 671cde5c81..fa06616433 100644
+--- a/modules/codec/avcodec/avcommon.h
++++ b/modules/codec/avcodec/avcommon.h
+@@ -109,6 +109,7 @@ static inline void vlc_init_avutil(vlc_object_t *obj)
+
+ #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
+ # include <libavformat/avformat.h>
++# include <libavformat/version.h>
+ static inline void vlc_init_avformat(vlc_object_t *obj)
+ {
+ vlc_avcodec_lock();
+@@ -117,7 +118,9 @@ static inline void vlc_init_avformat(vlc_object_t *obj)
+
+ avformat_network_init();
+
++#if (LIBAVFORMAT_VERSION_MICRO < 100) || (LIBAVFORMAT_VERSION_INT <
AV_VERSION_INT(58, 9, 100))
+ av_register_all();
++#endif
+
+ vlc_avcodec_unlock();
+ }
+@@ -125,13 +128,16 @@ static inline void vlc_init_avformat(vlc_object_t *obj)
+
+ #ifdef HAVE_LIBAVCODEC_AVCODEC_H
+ # include <libavcodec/avcodec.h>
++# include <libavcodec/version.h>
+ static inline void vlc_init_avcodec(vlc_object_t *obj)
+ {
+ vlc_avcodec_lock();
+
+ vlc_init_avutil(obj);
+
++#if (LIBAVFORMAT_VERSION_MICRO < 100) || (LIBAVCODEC_VERSION_INT <
AV_VERSION_INT(58, 10, 100))
+ avcodec_register_all();
++#endif
+
+ vlc_avcodec_unlock();
+ }
+--
+GitLab
+
diff --git a/vlc.spec b/vlc.spec
index b804318..10a7cfc 100644
--- a/vlc.spec
+++ b/vlc.spec
@@ -77,6 +77,8 @@ Patch10: recent_srt_fix.patch
Patch11: 0001-Revert-configure-ignore-too-new-SRT.patch
Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch
+Patch13: ffmpeg45.patch
+
BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib
BuildRequires: fontpackages-devel
@@ -354,6 +356,7 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac
%if 0%{?rhel} >= 7
%patch12 -p1
%endif
+%patch13 -p1
%{?_with_bootstrap:
rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || :