commit 46051cf58e3e0356e73cac237e18ebe71042f83b
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Fri Nov 19 11:13:53 2021 +0100
Update patch
ffmpeg45.patch | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 125 insertions(+), 8 deletions(-)
---
diff --git a/ffmpeg45.patch b/ffmpeg45.patch
index df4c3c8..a4eaa02 100644
--- a/ffmpeg45.patch
+++ b/ffmpeg45.patch
@@ -1,7 +1,7 @@
-From cde283fef6dc1f70fd46fe891642f3e07edbc433 Mon Sep 17 00:00:00 2001
+From e51408a0549371efae3792aa40f5c2d992d8b4d4 Mon Sep 17 00:00:00 2001
From: Ilkka Ollakka <ileoo(a)videolan.org>
Date: Wed, 7 Jul 2021 12:37:58 +0000
-Subject: [PATCH 1/2] avcodec: remove use of av_init_packet as it is deprecated
+Subject: [PATCH 1/4] avcodec: remove use of av_init_packet as it is deprecated
in new ffmpeg major version
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@@ -14,7 +14,7 @@ Also use av_packet_free instead of unref.
Use av_packet_clone and AVPacket * in vlc_av_packet_t.
(cherry picked from commit 16fd46fa506424134beb53ec88be3eea1b42a221)
-Signed-off-by: Hugo Beauzée-Luyssen <hugo(a)beauzee.fr>
+Signed-off-by: Hugo Beauzée-Luyssen <hugo(a)beauzee.fr>
---
modules/codec/avcodec/audio.c | 12 +++++++-----
modules/codec/avcodec/encoder.c | 25 ++++++++++++++-----------
@@ -151,7 +151,7 @@ index 5cac6339d6..a17ba985e1 100644
msg_Warn(dec, "cannot decode one subtitle (%zu bytes)",
block->i_buffer);
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
-index b99eb56e4a..e175cef3a6 100644
+index b99eb56e4a..2b1e3ad314 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1015,14 +1015,18 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t
**pp_block, bool *error
@@ -216,7 +216,7 @@ index b99eb56e4a..e175cef3a6 100644
- i_used = ret != AVERROR(EAGAIN) ? pkt.size : 0;
- av_packet_unref( &pkt );
+ i_used = ret != AVERROR(EAGAIN) ? pkt->size : 0;
-+ av_packet_unref( pkt );
++ av_packet_free( &pkt );
}
AVFrame *frame = av_frame_alloc();
@@ -290,10 +290,10 @@ index 48878c712b..405a6f6933 100644
GitLab
-From 149141346ddb419aa7c34fb59803c1db4035ced7 Mon Sep 17 00:00:00 2001
+From c70bb79bb84a59d2bb37ddffb4c3098f76c3f71b Mon Sep 17 00:00:00 2001
From: Ilkka Ollakka <ileoo(a)videolan.org>
Date: Fri, 18 Jun 2021 10:23:35 +0300
-Subject: [PATCH 2/2] avcodec/subtitle: stop using removed setter for pkt
+Subject: [PATCH 2/4] avcodec/subtitle: stop using removed setter for pkt
timebase
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@@ -302,7 +302,7 @@ Content-Transfer-Encoding: 8bit
Removed from ffmpeg repo in commit 23bb78d2ea4f0e3a0835744d59708efed50abccc.
(cherry picked from commit e7190e7a70e9701754c50348f5b6357759440657)
-Signed-off-by: Hugo Beauzée-Luyssen <hugo(a)beauzee.fr>
+Signed-off-by: Hugo Beauzée-Luyssen <hugo(a)beauzee.fr>
---
modules/codec/avcodec/subtitle.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@@ -325,3 +325,120 @@ index a17ba985e1..d3afe4270b 100644
--
GitLab
+
+From ab36b209ff07d5465a4958201521a9c2345fd918 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 3/4] avcodec: remove deprecation warning for av*_register_all
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+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.
+
+(cherry picked from commit 21d5a1933275edb7f67d05ea62a762464e07c2cb)
+Signed-off-by: Hugo Beauzée-Luyssen <hugo(a)beauzee.fr>
+---
+ 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 8c8298014f..158c01e320 100644
+--- a/modules/codec/avcodec/avcommon.h
++++ b/modules/codec/avcodec/avcommon.h
+@@ -97,6 +97,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();
+@@ -105,7 +106,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();
+ }
+@@ -113,13 +116,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
+
+
+From 8a0afbf54ba5b694deb5dcba7a63959fb222f93a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi(a)remlab.net>
+Date: Tue, 14 Apr 2020 19:25:07 +0300
+Subject: [PATCH 4/4] avcodec: fix flawed logic
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Cannot find any codec.
+
+Regression from 21d5a1933275edb7f67d05ea62a762464e07c2cb.
+
+(cherry picked from commit 067dcd0a1974b00a92e900b0e5c976349ad13859)
+Signed-off-by: Hugo Beauzée-Luyssen <hugo(a)beauzee.fr>
+---
+ modules/codec/avcodec/avcommon.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h
+index 158c01e320..ff5dba06c9 100644
+--- a/modules/codec/avcodec/avcommon.h
++++ b/modules/codec/avcodec/avcommon.h
+@@ -106,7 +106,7 @@ 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))
++#if (LIBAVFORMAT_VERSION_MICRO < 100) || (LIBAVFORMAT_VERSION_INT <
AV_VERSION_INT(58, 9, 100))
+ av_register_all();
+ #endif
+
+@@ -123,7 +123,7 @@ static inline void vlc_init_avcodec(vlc_object_t *obj)
+
+ vlc_init_avutil(obj);
+
+-#if (LIBAVFORMAT_VERSION_MICRO >= 100) && (LIBAVCODEC_VERSION_INT <
AV_VERSION_INT(58, 10, 100))
++#if (LIBAVFORMAT_VERSION_MICRO < 100) || (LIBAVCODEC_VERSION_INT <
AV_VERSION_INT(58, 10, 100))
+ avcodec_register_all();
+ #endif
+
+--
+GitLab
+
+