[gstreamer1-libav] Rebuilt for new ffmpeg snapshot
by Sérgio M. Basto
commit 92784180e4901e9330b269db1cea03ca7c349cd7
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Mon Nov 15 16:40:07 2021 +0000
Rebuilt for new ffmpeg snapshot
gstreamer1-libav.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gstreamer1-libav.spec b/gstreamer1-libav.spec
index cd8737f..b614ceb 100644
--- a/gstreamer1-libav.spec
+++ b/gstreamer1-libav.spec
@@ -4,7 +4,7 @@
Name: gstreamer1-libav
Epoch: 1
Version: 1.19.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: GStreamer 1.0 libav-based plug-ins
License: LGPLv2+
URL: https://gstreamer.freedesktop.org/
@@ -76,6 +76,9 @@ plug-in.
%endif
%changelog
+* Mon Nov 15 2021 Sérgio Basto <sergio(a)serjux.com> - 1:1.19.3-2
+- Rebuilt for new ffmpeg snapshot
+
* Mon Nov 15 2021 Sérgio Basto <sergio(a)serjux.com> - 1:1.19.3-1
- Update gstreamer1-libav to 1.19.3
3 years
[gstreamer1-libav] update sources
by Sérgio M. Basto
commit 21017ef4a2797f85fc71a5b94e6b2f57ec89abd9
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Mon Nov 15 15:42:25 2021 +0000
update sources
sources | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/sources b/sources
index 6805f84..bfda06d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (gst-libav-1.19.2.tar.xz) = e10e0e21aea655c500ef1266eee0410e3777e3a4aa0b85c75bc127345ddd62224dd07f063d30a06d64bf60e66508e9aca361665777935ca999d28c1c8d0eba36
+SHA512 (gst-libav-1.19.3.tar.xz) = 371296afe14b5f1fecc30c736b3aa0b2cd0d7bfd5bf28a343d6255cbfd9a65239e56b462878b9421566a791fda84a29171f036e8026a384dc7482f5bc2134153
3 years
[gstreamer1-plugins-ugly] Update gstreamer1-plugins-ugly to 1.19.3
by Sérgio M. Basto
commit cf7b03906a69924a5e8b1842c1d970251e6184fc
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Mon Nov 15 15:03:59 2021 +0000
Update gstreamer1-plugins-ugly to 1.19.3
gstreamer1-plugins-ugly.spec | 6 +++++-
sources | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gstreamer1-plugins-ugly.spec b/gstreamer1-plugins-ugly.spec
index adb00ca..2ce8442 100644
--- a/gstreamer1-plugins-ugly.spec
+++ b/gstreamer1-plugins-ugly.spec
@@ -7,7 +7,7 @@
Summary: GStreamer 1.0 streaming media framework "ugly" plug-ins
Name: gstreamer1-plugins-ugly
Epoch: 1
-Version: 1.19.2
+Version: 1.19.3
Release: 1%{?dist}
License: LGPLv2+
URL: https://gstreamer.freedesktop.org/
@@ -54,6 +54,7 @@ gstreamer-plugins-good because:
-D sidplay=disabled \
-D xingmux=disabled \
-D mpeg2dec=disabled \
+ -D gpl=enabled \
-D nls=disabled
%meson_build
@@ -77,6 +78,9 @@ gstreamer-plugins-good because:
%changelog
+* Mon Nov 15 2021 Sérgio Basto <sergio(a)serjux.com> - 1:1.19.3-1
+- Update gstreamer1-plugins-ugly to 1.19.3
+
* Sat Oct 09 2021 Sérgio Basto <sergio(a)serjux.com> - 1:1.19.2-1
- Update gstreamer1-plugins-ugly to 1.19.2
diff --git a/sources b/sources
index 6462c47..ebe49ce 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (gst-plugins-ugly-1.19.2.tar.xz) = ca7c2bcbf212f4b768e39bc59347de28b8655b54bbd8f81ed79f5275470951c49c0f83209ebf76507e12df22a27ba1265bf2bf72abeb6ac1a52aa799ce3ee8b2
+SHA512 (gst-plugins-ugly-1.19.3.tar.xz) = 2a716a9786aa692d8d13acaf54757c1f45560c9d199847f639b2a9a3e339f9dd5e480c358c6dccfd1f529919f4852117a425e1c6bc19f2add950fca064ab818b
3 years
[gstreamer1-libav/f35] (5 commits) ...Update gstreamer1-libav to 1.19.3
by Sérgio M. Basto
Summary of changes:
df731cd... Update gstreamer1-libav to 1.19.2 (*)
388bae9... rfpkg new-sources seems that sometimes fails (*)
3c02c2c... Rebuilt for new ffmpeg snapshot (*)
9007d97... fix (*)
c8051ec... Update gstreamer1-libav to 1.19.3 (*)
(*) This commit already existed in another branch; no separate mail sent
3 years
[gstreamer1-libav] Update gstreamer1-libav to 1.19.3
by Sérgio M. Basto
commit c8051ec0744a269b39c2f2ac7b1c82953cdf2e2c
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Mon Nov 15 12:01:23 2021 +0000
Update gstreamer1-libav to 1.19.3
gstreamer1-libav.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gstreamer1-libav.spec b/gstreamer1-libav.spec
index 65e92b0..cd8737f 100644
--- a/gstreamer1-libav.spec
+++ b/gstreamer1-libav.spec
@@ -3,8 +3,8 @@
Name: gstreamer1-libav
Epoch: 1
-Version: 1.19.2
-Release: 2%{?dist}
+Version: 1.19.3
+Release: 1%{?dist}
Summary: GStreamer 1.0 libav-based plug-ins
License: LGPLv2+
URL: https://gstreamer.freedesktop.org/
@@ -76,6 +76,9 @@ plug-in.
%endif
%changelog
+* Mon Nov 15 2021 Sérgio Basto <sergio(a)serjux.com> - 1:1.19.3-1
+- Update gstreamer1-libav to 1.19.3
+
* Thu Nov 11 2021 Leigh Scott <leigh123linux(a)gmail.com> - 1:1.19.2-2
- Rebuilt for new ffmpeg snapshot
3 years
[gstreamer1-plugins-bad-freeworld] Update gstreamer1-plugins-bad-freeworld to 1.19.3
by Sérgio M. Basto
commit 78b64ec697528f2cd56fe254acd9d825f36434e6
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Mon Nov 15 11:43:25 2021 +0000
Update gstreamer1-plugins-bad-freeworld to 1.19.3
build_what_we_need_only.patch | 12 +++++-------
gstreamer1-plugins-bad-freeworld.spec | 8 +++++---
sources | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/build_what_we_need_only.patch b/build_what_we_need_only.patch
index 62a68e5..8b6f50d 100644
--- a/build_what_we_need_only.patch
+++ b/build_what_we_need_only.patch
@@ -1,6 +1,6 @@
--- ./ext/meson.build.orig 2021-09-23 01:34:51.166608300 +0100
+++ ./ext/meson.build 2021-10-09 17:52:41.117762463 +0100
-@@ -1,76 +1,10 @@
+@@ -1,74 +1,9 @@
-subdir('aes')
-subdir('assrender')
-subdir('aom')
@@ -31,7 +31,6 @@
-subdir('ladspa')
-subdir('ldac')
subdir('libde265')
- subdir('libmms')
-subdir('lv2')
-subdir('mdns')
-subdir('modplug')
@@ -39,7 +38,6 @@
subdir('mplex')
-subdir('musepack')
-subdir('neon')
--subdir('ofa')
-subdir('onnx')
-subdir('openal')
-subdir('openaptx')
@@ -103,7 +101,7 @@ diff -uNrp a/gst/meson.build b/gst/meson.build
diff -uNrp a/meson.build b/meson.build
--- a/meson.build 2021-06-01 00:14:25.000000000 +0100
+++ b/meson.build 2021-06-08 13:32:38.208390976 +0100
-@@ -284,6 +284,8 @@ gstapp_dep = dependency('gstreamer-app-1
+@@ -292,6 +292,8 @@ gstapp_dep = dependency('gstreamer-app-1
fallback : ['gst-plugins-base', 'app_dep'])
gstaudio_dep = dependency('gstreamer-audio-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'audio_dep'])
@@ -112,9 +110,9 @@ diff -uNrp a/meson.build b/meson.build
gstfft_dep = dependency('gstreamer-fft-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'fft_dep'])
gstriff_dep = dependency('gstreamer-riff-1.0', version : gst_req,
-@@ -484,13 +486,9 @@ pkgconfig.generate(
- description : 'Streaming media framework, bad plugins libraries',
- )
+@@ -494,13 +496,9 @@ pkgconfig.generate(
+
+ gpl_allowed = get_option('gpl').allowed()
-subdir('gst-libs')
subdir('gst')
diff --git a/gstreamer1-plugins-bad-freeworld.spec b/gstreamer1-plugins-bad-freeworld.spec
index 1c5f551..2201b7c 100644
--- a/gstreamer1-plugins-bad-freeworld.spec
+++ b/gstreamer1-plugins-bad-freeworld.spec
@@ -5,7 +5,7 @@
Summary: GStreamer 1.0 streaming media framework "bad" plug-ins
Name: gstreamer1-plugins-bad-freeworld
Epoch: 1
-Version: 1.19.2
+Version: 1.19.3
Release: 1%{?dist}
License: LGPLv2+
URL: https://gstreamer.freedesktop.org/
@@ -22,7 +22,6 @@ BuildRequires: libXt-devel
BuildRequires: orc-devel
BuildRequires: libdca-devel
BuildRequires: faad2-devel
-BuildRequires: libmms-devel
BuildRequires: mjpegtools-devel >= 2.0.0
BuildRequires: librtmp-devel
BuildRequires: openssl-devel
@@ -61,6 +60,7 @@ well enough, or the code is not of good enough quality.
-D doc=disabled \
-D introspection=disabled \
-D examples=disabled \
+ -D gpl=enabled \
%ifnarch x86_64
-D svthevcenc=disabled \
%endif
@@ -91,7 +91,6 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig
%{_libdir}/gstreamer-1.0/libgstde265.so
%{_libdir}/gstreamer-1.0/libgstdtsdec.so
%{_libdir}/gstreamer-1.0/libgstfaad.so
-%{_libdir}/gstreamer-1.0/libgstmms.so
%{_libdir}/gstreamer-1.0/libgstmpeg2enc.so
%{_libdir}/gstreamer-1.0/libgstmplex.so
%{_libdir}/gstreamer-1.0/libgstrtmp.so
@@ -104,6 +103,9 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig
%changelog
+* Sun Nov 14 2021 Sérgio Basto <sergio(a)serjux.com> - 1:1.19.3-1
+- Update gstreamer1-plugins-bad-freeworld to 1.19.3
+
* Sat Oct 09 2021 Sérgio Basto <sergio(a)serjux.com> - 1:1.19.2-1
- Update gstreamer1-plugins-bad-freeworld to 1.19.2
diff --git a/sources b/sources
index aa49f39..e836b17 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (gst-plugins-bad-1.19.2.tar.xz) = c177ee4c17c1a2542243dc80d09cc5df7643c013f698eea94583fcf1417435a8c9877dcd4a7ec610d83fa666e559801b0fb5fa5ca2d681a7e4c15910683baa1b
+SHA512 (gst-plugins-bad-1.19.3.tar.xz) = a9bcf2cd5cd1390dceea36a806bc8bdafec87f94792b00137e992537928038ab45472d88f35d1bf73cb8634db1bb0ca5c5e7c524bc0e7d2144d9494ce59e1c21
3 years
[vlc] Apply upstream ffmpeg fix to f36+
by Leigh Scott
commit d4bf359633c49fb567de1156e11bc283b9713c2f
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Mon Nov 15 11:12:14 2021 +0000
Apply upstream ffmpeg fix to f36+
ffmpeg45.patch | 354 +++++++++++++++++++++++++++++++++++++++++++++++++--------
vlc.spec | 4 +-
2 files changed, 311 insertions(+), 47 deletions(-)
---
diff --git a/ffmpeg45.patch b/ffmpeg45.patch
index 8d76211..df4c3c8 100644
--- a/ffmpeg45.patch
+++ b/ffmpeg45.patch
@@ -1,65 +1,327 @@
-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 cde283fef6dc1f70fd46fe891642f3e07edbc433 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
+ in new ffmpeg major version
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
-From doc/APIchanges:
+av_init_packet is deprecated in new major version of ffmpeg.
- 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().
+Also use av_packet_free instead of unref.
- 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().
+Use av_packet_clone and AVPacket * in vlc_av_packet_t.
-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 16fd46fa506424134beb53ec88be3eea1b42a221)
+Signed-off-by: Hugo Beauzée-Luyssen <hugo(a)beauzee.fr>
---
- modules/codec/avcodec/avcommon.h | 6 ++++++
- 1 file changed, 6 insertions(+)
+ modules/codec/avcodec/audio.c | 12 +++++++-----
+ modules/codec/avcodec/encoder.c | 25 ++++++++++++++-----------
+ modules/codec/avcodec/subtitle.c | 17 +++++++++++------
+ modules/codec/avcodec/video.c | 30 +++++++++++++++++-------------
+ modules/demux/avformat/mux.c | 29 +++++++++++++++++------------
+ 5 files changed, 66 insertions(+), 47 deletions(-)
-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)
+diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
+index eec255ae0b..8c3fa7a217 100644
+--- a/modules/codec/avcodec/audio.c
++++ b/modules/codec/avcodec/audio.c
+@@ -363,11 +363,13 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
+ /* Feed in the loop as buffer could have been full on first iterations */
+ if( p_block )
+ {
+- AVPacket pkt;
+- av_init_packet( &pkt );
+- pkt.data = p_block->p_buffer;
+- pkt.size = p_block->i_buffer;
+- ret = avcodec_send_packet( ctx, &pkt );
++ AVPacket *pkt = av_packet_alloc();
++ if( !pkt )
++ goto end;
++ pkt->data = p_block->p_buffer;
++ pkt->size = p_block->i_buffer;
++ ret = avcodec_send_packet( ctx, pkt );
++ av_packet_free(&pkt);
+ if( ret == 0 ) /* Block has been consumed */
+ {
+ /* Only set new pts from input block if it has been used,
+diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
+index b083d171f3..27af11a412 100644
+--- a/modules/codec/avcodec/encoder.c
++++ b/modules/codec/avcodec/encoder.c
+@@ -1061,14 +1061,14 @@ error:
+ typedef struct
{
- vlc_avcodec_lock();
-@@ -117,7 +118,9 @@ static inline void vlc_init_avformat(vlc_object_t *obj)
+ block_t self;
+- AVPacket packet;
++ AVPacket *packet;
+ } vlc_av_packet_t;
- avformat_network_init();
-
-+#if (LIBAVFORMAT_VERSION_MICRO < 100) || (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100))
- av_register_all();
-+#endif
+ static void vlc_av_packet_Release(block_t *block)
+ {
+ vlc_av_packet_t *b = (void *) block;
- vlc_avcodec_unlock();
+- av_packet_unref(&b->packet);
++ av_packet_free( &b->packet );
+ free(b);
}
-@@ -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)
+@@ -1089,7 +1089,7 @@ static block_t *vlc_av_packet_Wrap(AVPacket *packet, mtime_t i_length, AVCodecCo
+ block_Init( p_block, packet->data, packet->size );
+ p_block->i_nb_samples = 0;
+ p_block->pf_release = vlc_av_packet_Release;
+- b->packet = *packet;
++ b->packet = packet;
+
+ p_block->i_length = i_length;
+ p_block->i_pts = packet->pts;
+@@ -1138,11 +1138,13 @@ static void check_hurry_up( encoder_sys_t *p_sys, AVFrame *frame, encoder_t *p_e
+
+ static block_t *encode_avframe( encoder_t *p_enc, encoder_sys_t *p_sys, AVFrame *frame )
{
- vlc_avcodec_lock();
+- AVPacket av_pkt;
+- av_pkt.data = NULL;
+- av_pkt.size = 0;
++ AVPacket *av_pkt = av_packet_alloc();
+
+- av_init_packet( &av_pkt );
++ if( !av_pkt )
++ {
++ av_frame_unref( frame );
++ return NULL;
++ }
+
+ int ret = avcodec_send_frame( p_sys->p_context, frame );
+ if( frame && ret != 0 && ret != AVERROR(EAGAIN) )
+@@ -1150,18 +1152,19 @@ static block_t *encode_avframe( encoder_t *p_enc, encoder_sys_t *p_sys, AVFrame
+ msg_Warn( p_enc, "cannot send one frame to encoder %d", ret );
+ return NULL;
+ }
+- ret = avcodec_receive_packet( p_sys->p_context, &av_pkt );
++ ret = avcodec_receive_packet( p_sys->p_context, av_pkt );
+ if( ret != 0 && ret != AVERROR(EAGAIN) )
+ {
+ msg_Warn( p_enc, "cannot encode one frame" );
++ av_packet_free( &av_pkt );
+ return NULL;
+ }
+
+- block_t *p_block = vlc_av_packet_Wrap( &av_pkt,
+- av_pkt.duration / p_sys->p_context->time_base.den, p_sys->p_context );
++ block_t *p_block = vlc_av_packet_Wrap( av_pkt,
++ av_pkt->duration / p_sys->p_context->time_base.den, p_sys->p_context );
+ if( unlikely(p_block == NULL) )
+ {
+- av_packet_unref( &av_pkt );
++ av_packet_free( &av_pkt );
+ return NULL;
+ }
+ return p_block;
+diff --git a/modules/codec/avcodec/subtitle.c b/modules/codec/avcodec/subtitle.c
+index 5cac6339d6..a17ba985e1 100644
+--- a/modules/codec/avcodec/subtitle.c
++++ b/modules/codec/avcodec/subtitle.c
+@@ -186,16 +186,21 @@ static subpicture_t *DecodeBlock(decoder_t *dec, block_t **block_ptr)
+ AVSubtitle subtitle;
+ memset(&subtitle, 0, sizeof(subtitle));
+
+- AVPacket pkt;
+- av_init_packet(&pkt);
+- pkt.data = block->p_buffer;
+- pkt.size = block->i_buffer;
+- pkt.pts = block->i_pts;
++ AVPacket *pkt = av_packet_alloc();
++ if(!pkt)
++ {
++ block_Release(block);
++ return NULL;
++ }
++ pkt->data = block->p_buffer;
++ pkt->size = block->i_buffer;
++ pkt->pts = block->i_pts;
+
+ int has_subtitle = 0;
+ int used = avcodec_decode_subtitle2(sys->p_context,
+- &subtitle, &has_subtitle, &pkt);
++ &subtitle, &has_subtitle, pkt);
+
++ av_packet_free(&pkt);
+ if (used < 0) {
+ 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
+--- 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
+
+ if( b_has_data || b_start_drain )
+ {
+- AVPacket pkt;
+- av_init_packet( &pkt );
++ AVPacket *pkt = av_packet_alloc();
++ if(!pkt)
++ {
++ *error = true;
++ break;
++ }
+ if( b_has_data )
+ {
+- pkt.data = p_block->p_buffer;
+- pkt.size = p_block->i_buffer;
+- pkt.pts = p_block->i_pts > VLC_TS_INVALID ? p_block->i_pts : AV_NOPTS_VALUE;
+- pkt.dts = p_block->i_dts > VLC_TS_INVALID ? p_block->i_dts : AV_NOPTS_VALUE;
++ pkt->data = p_block->p_buffer;
++ pkt->size = p_block->i_buffer;
++ pkt->pts = p_block->i_pts > VLC_TS_INVALID ? p_block->i_pts : AV_NOPTS_VALUE;
++ pkt->dts = p_block->i_dts > VLC_TS_INVALID ? p_block->i_dts : AV_NOPTS_VALUE;
+
+ /* Make sure we don't reuse the same timestamps twice */
+ p_block->i_pts =
+@@ -1031,21 +1035,21 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error
+ else /* start drain */
+ {
+ /* Return delayed frames if codec has CODEC_CAP_DELAY */
+- pkt.data = NULL;
+- pkt.size = 0;
++ pkt->data = NULL;
++ pkt->size = 0;
+ p_sys->b_draining = true;
+ }
+
+ if( !p_sys->palette_sent )
+ {
+- uint8_t *pal = av_packet_new_side_data(&pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE);
++ uint8_t *pal = av_packet_new_side_data(pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE);
+ if (pal) {
+ memcpy(pal, p_dec->fmt_in.video.p_palette->palette, AVPALETTE_SIZE);
+ p_sys->palette_sent = true;
+ }
+ }
+
+- ret = avcodec_send_packet(p_context, &pkt);
++ ret = avcodec_send_packet(p_context, pkt);
+ if( ret != 0 && ret != AVERROR(EAGAIN) )
+ {
+ if (ret == AVERROR(ENOMEM) || ret == AVERROR(EINVAL))
+@@ -1053,11 +1057,11 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error
+ msg_Err(p_dec, "avcodec_send_packet critical error");
+ *error = true;
+ }
+- av_packet_unref( &pkt );
++ av_packet_free( &pkt );
+ break;
+ }
+- i_used = ret != AVERROR(EAGAIN) ? pkt.size : 0;
+- av_packet_unref( &pkt );
++ i_used = ret != AVERROR(EAGAIN) ? pkt->size : 0;
++ av_packet_unref( pkt );
+ }
+
+ AVFrame *frame = av_frame_alloc();
+diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
+index 48878c712b..405a6f6933 100644
+--- a/modules/demux/avformat/mux.c
++++ b/modules/demux/avformat/mux.c
+@@ -341,14 +341,16 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
+ block_t *p_data = block_FifoGet( p_input->p_fifo );
+ int i_stream = *((int *)p_input->p_sys);
+ AVStream *p_stream = p_sys->oc->streams[i_stream];
+- AVPacket pkt;
+-
+- memset( &pkt, 0, sizeof(AVPacket) );
++ AVPacket *pkt = av_packet_alloc();
++ if( !pkt )
++ {
++ block_Release( p_data );
++ return VLC_EGENERIC;
++ }
- vlc_init_avutil(obj);
+- av_init_packet(&pkt);
+- pkt.data = p_data->p_buffer;
+- pkt.size = p_data->i_buffer;
+- pkt.stream_index = i_stream;
++ pkt->data = p_data->p_buffer;
++ pkt->size = p_data->i_buffer;
++ pkt->stream_index = i_stream;
-+#if (LIBAVFORMAT_VERSION_MICRO < 100) || (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100))
- avcodec_register_all();
-+#endif
+ if( p_data->i_flags & BLOCK_FLAG_TYPE_I )
+ {
+@@ -359,29 +361,32 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
+ #endif
- vlc_avcodec_unlock();
+ p_sys->b_write_keyframe = true;
+- pkt.flags |= AV_PKT_FLAG_KEY;
++ pkt->flags |= AV_PKT_FLAG_KEY;
+ }
+
+ if( p_data->i_pts > 0 )
+- pkt.pts = p_data->i_pts * p_stream->time_base.den /
++ pkt->pts = p_data->i_pts * p_stream->time_base.den /
+ CLOCK_FREQ / p_stream->time_base.num;
+ if( p_data->i_dts > 0 )
+- pkt.dts = p_data->i_dts * p_stream->time_base.den /
++ pkt->dts = p_data->i_dts * p_stream->time_base.den /
+ CLOCK_FREQ / p_stream->time_base.num;
+
+ /* this is another hack to prevent libavformat from triggering the "non monotone timestamps" check in avformat/utils.c */
+ p_stream->cur_dts = ( p_data->i_dts * p_stream->time_base.den /
+ CLOCK_FREQ / p_stream->time_base.num ) - 1;
+
+- if( av_write_frame( p_sys->oc, &pkt ) < 0 )
++ if( av_write_frame( p_sys->oc, pkt ) < 0 )
+ {
+ msg_Err( p_mux, "could not write frame (pts: %"PRId64", dts: %"PRId64") "
+ "(pkt pts: %"PRId64", dts: %"PRId64")",
+- p_data->i_pts, p_data->i_dts, pkt.pts, pkt.dts );
++ p_data->i_pts, p_data->i_dts, pkt->pts, pkt->dts );
+ block_Release( p_data );
++ av_packet_unref( pkt );
+ return VLC_EGENERIC;
+ }
+
++
++ av_packet_unref( pkt );
+ block_Release( p_data );
+ return VLC_SUCCESS;
}
--
GitLab
+
+From 149141346ddb419aa7c34fb59803c1db4035ced7 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
+ timebase
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+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>
+---
+ modules/codec/avcodec/subtitle.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/modules/codec/avcodec/subtitle.c b/modules/codec/avcodec/subtitle.c
+index a17ba985e1..d3afe4270b 100644
+--- a/modules/codec/avcodec/subtitle.c
++++ b/modules/codec/avcodec/subtitle.c
+@@ -90,7 +90,9 @@ int InitSubtitleDec(vlc_object_t *obj)
+ context->extradata_size = 0;
+ context->extradata = NULL;
+
+-#if LIBAVFORMAT_VERSION_MICRO >= 100
++#if LIBAVFORMAT_VERSION_MAJOR >= 59
++ context->pkt_timebase=AV_TIME_BASE_Q;
++#elif LIBAVFORMAT_VERSION_MICRO >= 100
+ av_codec_set_pkt_timebase(context, AV_TIME_BASE_Q);
+ #endif
+
+--
+GitLab
+
diff --git a/vlc.spec b/vlc.spec
index 10a7cfc..dbea93c 100644
--- a/vlc.spec
+++ b/vlc.spec
@@ -77,7 +77,7 @@ 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
+Patch13: https://code.videolan.org/videolan/vlc/-/merge_requests/895.patch#/ffmpeg...
BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib
@@ -356,7 +356,9 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac
%if 0%{?rhel} >= 7
%patch12 -p1
%endif
+%if 0%{?fedora} > 35
%patch13 -p1
+%endif
%{?_with_bootstrap:
rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || :
3 years