Leigh Scott 3 years ago
parent 4cfe09e382
commit 3e020fd312

@ -0,0 +1,65 @@
From 21d5a1933275edb7f67d05ea62a762464e07c2cb Mon Sep 17 00:00:00 2001
From: Alexandre Janniaux <ajanni@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

@ -77,6 +77,8 @@ Patch10: recent_srt_fix.patch
Patch11: 0001-Revert-configure-ignore-too-new-SRT.patch Patch11: 0001-Revert-configure-ignore-too-new-SRT.patch
Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch
Patch13: ffmpeg45.patch
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib BuildRequires: libappstream-glib
BuildRequires: fontpackages-devel BuildRequires: fontpackages-devel
@ -354,6 +356,7 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac
%if 0%{?rhel} >= 7 %if 0%{?rhel} >= 7
%patch12 -p1 %patch12 -p1
%endif %endif
%patch13 -p1
%{?_with_bootstrap: %{?_with_bootstrap:
rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || :

Loading…
Cancel
Save