Compare commits

...
Sign in to create a new pull request.

29 commits

Author SHA1 Message Date
Yaakov Selkowitz
5638ebdaf6 Drop schroedinger plugin
This plugin has been dropped from 3.0.24 in favour of avcodec:

https://code.videolan.org/videolan/vlc/-/merge_requests/9433
2026-07-27 13:53:13 -04:00
Gwyn Ciesla
9e3b2daaf7 libupnp rebuild 2026-07-21 11:09:27 -05:00
Fedora Release Engineering
cf6d76a464 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:34:36 +00:00
Gwyn Ciesla
1e82a6562c libupnp rebuild 2026-06-26 09:31:12 -05:00
Yaakov Selkowitz
af1da39482 Rebuilt for abseil-cpp 20260526.0 2026-06-24 19:46:35 -04:00
Dominik 'Rathann' Mierzejewski
453c035755 Rebuilt for live555 2026-06-24 18:15:11 +02:00
Dominik 'Rathann' Mierzejewski
da450d86d8 Rebuilt for live555 2026-04-26 10:06:03 +02:00
Yaakov Selkowitz
ded7dd48e9 Re-enable spatialaudio
https://code.videolan.org/videolan/vlc/-/merge_requests/8921
2026-04-17 16:32:50 -04:00
Yaakov Selkowitz
a66b943e54 Fix spatialaudio disablement 2026-03-23 23:27:00 -04:00
Nicolas Chauvet
b08b4c1e46 Temporary drop libspatialaudio#2 2026-03-19 23:02:06 +01:00
Nicolas Chauvet
30190f2a3c Temporary drop libspatialaudio 2026-03-19 22:47:16 +01:00
Dominik 'Rathann' Mierzejewski
b80724c805 Rebuilt for libvpx-1.16.0 and live555-2026.02.26 2026-03-09 21:29:57 +01:00
Yaakov Selkowitz
7d8dce4f92 Rebuilt for lua 5.5 2026-03-08 11:39:44 -04:00
Yaakov Selkowitz
515c87fa57 Fix build with libupnp-1.18 2026-02-11 12:35:46 -05:00
Yaakov Selkowitz
2fd65df894 Fix build with gstreamer 1.28 2026-02-10 11:08:42 -05:00
Yaakov Selkowitz
e6738b5b7f Rebuilt for https://fedoraproject.org/wiki/Changes/TagLib2 2026-01-25 01:39:04 -05:00
Yaakov Selkowitz
666833679c 3.0.23 2026-01-18 19:39:28 -05:00
Fedora Release Engineering
26219570e9 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 20:00:27 +00:00
Nicolas Chauvet
31268b10bc Rebuilt for libspatialaudio 2026-01-07 18:48:15 +01:00
FeRD (Frank Dana)
9a9eaa57b5 spec: Make opencv exclude conditional
If the opencv plugin isn't being built, don't %%exclude it from
the main package. Prevents a file-not-found build warning.

[skip changelog]
2026-01-02 13:40:02 -05:00
Yaakov Selkowitz
ab86867987 3.0.22 2025-12-02 18:22:12 -05:00
Yaakov Selkowitz
f9c0b66715 3.0.22-rc2 2025-12-02 18:22:12 -05:00
Yaakov Selkowitz
95099bfd16 3.0.22-rc1 2025-12-02 18:22:12 -05:00
Yaakov Selkowitz
0d8114ae39 Enable daala in EPEL 10
daala is available as of EPEL 10.1, and 10.0 is out of support.
2025-12-02 18:22:12 -05:00
Dominik 'Rathann' Mierzejewski
841df9659c correct postproc bcond to account for EPEL 11 2025-11-07 20:29:28 +01:00
Dominik 'Rathann' Mierzejewski
0eecef99dd Fix build with FFmpeg 8
Stop building libpostproc plugin (removed by FFmpeg upstream)

Backport upstream patches to avoid using deprecated fields and
definitions.
2025-11-06 12:12:17 +01:00
Dominik 'Rathann' Mierzejewski
8fc10c6411 Rebuilt for live555 2025-11-02 16:38:50 +01:00
Yaakov Selkowitz
8f8be22ee5 Disable crystalhd
libcrystalhd was retired from F43:

https://src.fedoraproject.org/rpms/libcrystalhd/c/79d27384e8f33077bd176f25a71bc0e8e05951e8

Also, added upgrade helpers for other conditional subpackages.
2025-07-29 15:22:54 -04:00
Fedora Release Engineering
100ba3ead9 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 20:10:48 +00:00
14 changed files with 222 additions and 2586 deletions

4
.gitignore vendored
View file

@ -1,2 +1,2 @@
/vlc-3.0.20.tar.xz
/vlc-3.0.21.tar.xz
/vlc-*.tar.bz2
/vlc-*.tar.xz

View file

@ -1,775 +0,0 @@
From 81d6d56df6e5a66ed99970e2c559539858f4a0b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
Date: Sat, 5 May 2018 15:28:15 +0300
Subject: [PATCH 01/11] avcodec: avoid signedness mismatch warning
Bitmask should be unsigned, but ffmpeg seems confused with itself.
(cherry picked from commit 8544233e7fde2965435e32a445494898440ecc30)
---
modules/codec/avcodec/audio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index 50a76c7a18e..e5af0ca5f2f 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -593,9 +593,9 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
uint32_t pi_order_src[i_order_max];
int i_channels_src = 0;
- int64_t channel_layout =
+ uint64_t channel_layout =
p_sys->p_context->channel_layout ? p_sys->p_context->channel_layout :
- av_get_default_channel_layout( p_sys->p_context->channels );
+ (uint64_t)av_get_default_channel_layout( p_sys->p_context->channels );
if( channel_layout )
{
--
GitLab
From c7709e7a048eb69b656d7f9663debbc1dde1f591 Mon Sep 17 00:00:00 2001
From: Ilkka Ollakka <ileoo@videolan.org>
Date: Wed, 5 Jul 2023 12:51:34 +0300
Subject: [PATCH 02/11] avcodec: use p_dec->fmt_out instead of context channels
on audio channel-count
reduces the need of ifdefs when adding ch_layout support
(cherry picked from commit bddf5ba19111d1cc4463d9876c4bc4ba75f82d7f)
---
modules/codec/avcodec/audio.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index e5af0ca5f2f..26166c084e5 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -484,15 +484,15 @@ static block_t * ConvertAVFrame( decoder_t *p_dec, AVFrame *frame )
/* Interleave audio if required */
if( av_sample_fmt_is_planar( ctx->sample_fmt ) )
{
- p_block = block_Alloc(frame->linesize[0] * ctx->channels);
+ p_block = block_Alloc(frame->linesize[0] * p_dec->fmt_out.audio.i_channels );
if ( likely(p_block) )
{
- const void *planes[ctx->channels];
- for (int i = 0; i < ctx->channels; i++)
+ const void *planes[p_dec->fmt_out.audio.i_channels];
+ for (int i = 0; i < p_dec->fmt_out.audio.i_channels; i++)
planes[i] = frame->extended_data[i];
aout_Interleave(p_block->p_buffer, planes, frame->nb_samples,
- ctx->channels, p_dec->fmt_out.audio.i_format);
+ p_dec->fmt_out.audio.i_channels, p_dec->fmt_out.audio.i_format);
p_block->i_nb_samples = frame->nb_samples;
}
av_frame_free(&frame);
@@ -511,7 +511,7 @@ static block_t * ConvertAVFrame( decoder_t *p_dec, AVFrame *frame )
{
aout_ChannelExtract( p_buffer->p_buffer,
p_dec->fmt_out.audio.i_channels,
- p_block->p_buffer, ctx->channels,
+ p_block->p_buffer, p_dec->fmt_out.audio.i_channels,
p_block->i_nb_samples, p_sys->pi_extraction,
p_dec->fmt_out.audio.i_bitspersample );
p_buffer->i_nb_samples = p_block->i_nb_samples;
@@ -600,13 +600,13 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
if( channel_layout )
{
for( unsigned i = 0; i < i_order_max
- && i_channels_src < p_sys->p_context->channels; i++ )
+ && i_channels_src < p_dec->fmt_out.audio.i_channels; i++ )
{
if( channel_layout & pi_channels_map[i][0] )
pi_order_src[i_channels_src++] = pi_channels_map[i][1];
}
- if( i_channels_src != p_sys->p_context->channels && b_trust )
+ if( i_channels_src != p_dec->fmt_out.audio.i_channels && b_trust )
msg_Err( p_dec, "Channel layout not understood" );
/* Detect special dual mono case */
--
GitLab
From 99b14966182995314f5b29fd972d6a9000ea3e00 Mon Sep 17 00:00:00 2001
From: Ilkka Ollakka <ileoo@videolan.org>
Date: Wed, 5 Jul 2023 13:33:09 +0300
Subject: [PATCH 03/11] avcodec: audio decoder to use ch_layout
(cherry picked from commit 496f0f2a659c1339d1e37330d446e9b6ce96e76b)
---
modules/codec/avcodec/audio.c | 42 ++++++++++++++++++++++++++++-------
1 file changed, 34 insertions(+), 8 deletions(-)
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index 26166c084e5..ad8a40ab4ed 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -139,7 +139,11 @@ static int OpenAudioCodec( decoder_t *p_dec )
}
ctx->sample_rate = p_dec->fmt_in.audio.i_rate;
+#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
+ av_channel_layout_default( &ctx->ch_layout, p_dec->fmt_in.audio.i_channels );
+#else
ctx->channels = p_dec->fmt_in.audio.i_channels;
+#endif
ctx->block_align = p_dec->fmt_in.audio.i_blockalign;
ctx->bit_rate = p_dec->fmt_in.i_bitrate;
ctx->bits_per_coded_sample = p_dec->fmt_in.audio.i_bitspersample;
@@ -395,12 +399,17 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
ret = avcodec_receive_frame( ctx, frame );
if( ret == 0 )
{
+#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
+ int channels = frame->ch_layout.nb_channels;
+#else
+ int channels = ctx->channels;
+#endif
/* checks and init from first decoded frame */
- if( ctx->channels <= 0 || ctx->channels > INPUT_CHAN_MAX
+ if( channels <= 0 || channels > INPUT_CHAN_MAX
|| ctx->sample_rate <= 0 )
{
msg_Warn( p_dec, "invalid audio properties channels count %d, sample rate %d",
- ctx->channels, ctx->sample_rate );
+ channels, ctx->sample_rate );
goto drop;
}
else if( p_dec->fmt_out.audio.i_rate != (unsigned int)ctx->sample_rate )
@@ -580,6 +589,16 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
p_dec->fmt_out.audio.i_rate = p_sys->p_context->sample_rate;
/* */
+#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
+ if( p_sys->i_previous_channels == p_sys->p_context->ch_layout.nb_channels &&
+ p_sys->i_previous_layout == p_sys->p_context->ch_layout.u.mask )
+ return;
+ if( b_trust )
+ {
+ p_sys->i_previous_channels = p_sys->p_context->ch_layout.nb_channels;
+ p_sys->i_previous_layout = p_sys->p_context->ch_layout.u.mask;
+ }
+#else
if( p_sys->i_previous_channels == p_sys->p_context->channels &&
p_sys->i_previous_layout == p_sys->p_context->channel_layout )
return;
@@ -588,25 +607,32 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
p_sys->i_previous_channels = p_sys->p_context->channels;
p_sys->i_previous_layout = p_sys->p_context->channel_layout;
}
+#endif
const unsigned i_order_max = sizeof(pi_channels_map)/sizeof(*pi_channels_map);
uint32_t pi_order_src[i_order_max];
int i_channels_src = 0;
- uint64_t channel_layout =
+#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
+ uint64_t channel_layout_mask = p_sys->p_context->ch_layout.u.mask;
+ int channel_count = p_sys->p_context->ch_layout.nb_channels;
+#else
+ uint64_t channel_layout_mask =
p_sys->p_context->channel_layout ? p_sys->p_context->channel_layout :
(uint64_t)av_get_default_channel_layout( p_sys->p_context->channels );
+ int channel_count = p_sys->p_context->channels;
+#endif
- if( channel_layout )
+ if( channel_layout_mask )
{
for( unsigned i = 0; i < i_order_max
- && i_channels_src < p_dec->fmt_out.audio.i_channels; i++ )
+ && i_channels_src < channel_count; i++ )
{
- if( channel_layout & pi_channels_map[i][0] )
+ if( channel_layout_mask & pi_channels_map[i][0] )
pi_order_src[i_channels_src++] = pi_channels_map[i][1];
}
- if( i_channels_src != p_dec->fmt_out.audio.i_channels && b_trust )
+ if( i_channels_src != channel_count && b_trust )
msg_Err( p_dec, "Channel layout not understood" );
/* Detect special dual mono case */
@@ -638,7 +664,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
{
msg_Warn( p_dec, "no channel layout found");
p_dec->fmt_out.audio.i_physical_channels = 0;
- p_dec->fmt_out.audio.i_channels = p_sys->p_context->channels;
+ p_dec->fmt_out.audio.i_channels = channel_count;
}
aout_FormatPrepare( &p_dec->fmt_out.audio );
--
GitLab
From c44edb85e4f25cbc7a848211d2d3ca9f03bd46e6 Mon Sep 17 00:00:00 2001
From: Ilkka Ollakka <ileoo@videolan.org>
Date: Tue, 4 Jul 2023 16:52:38 +0300
Subject: [PATCH 04/11] avcodec: use p_enc audio channels instead of context
channels in encoder
Allows to have less conditions in code when adding new ch_layout use
(cherry-picked from commit 29747a8abb98ba53a64aa6761983891eeed2e0e4)
---
modules/codec/avcodec/encoder.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 4919ccf0e0e..52848de0658 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -790,7 +790,7 @@ int InitVideoEnc( vlc_object_t *p_this )
}
}
}
- if( i_channels_src != p_context->channels )
+ if( i_channels_src != p_enc->fmt_out.audio.i_channels )
msg_Err( p_enc, "Channel layout not understood" );
p_sys->i_channels_to_reorder =
@@ -897,7 +897,7 @@ int InitVideoEnc( vlc_object_t *p_this )
if( ret )
{
if( p_enc->fmt_in.i_cat != AUDIO_ES ||
- (p_context->channels <= 2 && i_codec_id != AV_CODEC_ID_MP2
+ (p_enc->fmt_out.audio.i_channels <= 2 && i_codec_id != AV_CODEC_ID_MP2
&& i_codec_id != AV_CODEC_ID_MP3) )
errmsg:
{
@@ -922,7 +922,7 @@ errmsg:
goto error;
}
- if( p_context->channels > 2 )
+ if( p_enc->fmt_out.audio.i_channels > 2 )
{
p_context->channels = 2;
p_context->channel_layout = channel_mask[p_context->channels][1];
@@ -1028,7 +1028,7 @@ errmsg:
p_context->frame_size :
AV_INPUT_BUFFER_MIN_SIZE;
p_sys->i_buffer_out = av_samples_get_buffer_size(NULL,
- p_sys->p_context->channels, p_sys->i_frame_size,
+ p_enc->fmt_out.audio.i_channels, p_sys->i_frame_size,
p_sys->p_context->sample_fmt, DEFAULT_ALIGN);
p_sys->p_buffer = av_malloc( p_sys->i_buffer_out );
if ( unlikely( p_sys->p_buffer == NULL ) )
@@ -1278,7 +1278,7 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, uns
{
block_t *p_block = NULL;
//How much we need to copy from new packet
- const size_t leftover = leftover_samples * p_sys->p_context->channels * p_sys->i_sample_bytes;
+ const size_t leftover = leftover_samples * p_enc->fmt_out.audio.i_channels * p_sys->i_sample_bytes;
av_frame_unref( p_sys->frame );
p_sys->frame->format = p_sys->p_context->sample_fmt;
@@ -1301,7 +1301,7 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, uns
// We need to deinterleave from p_aout_buf to p_buffer the leftover bytes
if( p_sys->b_planar )
aout_Deinterleave( p_sys->p_interleave_buf, p_sys->p_buffer,
- p_sys->i_frame_size, p_sys->p_context->channels, p_enc->fmt_in.i_codec );
+ p_sys->i_frame_size, p_enc->fmt_out.audio.i_channels, p_enc->fmt_in.i_codec );
else
memcpy( p_sys->p_buffer + buffer_delay, p_aout_buf->p_buffer, leftover);
@@ -1319,7 +1319,7 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, uns
memset( p_sys->p_buffer + (leftover+buffer_delay), 0, padding_size );
buffer_delay += padding_size;
}
- if( avcodec_fill_audio_frame( p_sys->frame, p_sys->p_context->channels,
+ if( avcodec_fill_audio_frame( p_sys->frame, p_enc->fmt_out.audio.i_channels,
p_sys->p_context->sample_fmt, p_sys->b_planar ? p_sys->p_interleave_buf : p_sys->p_buffer,
p_sys->i_buffer_out,
DEFAULT_ALIGN) < 0 )
@@ -1349,7 +1349,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
//i_bytes_left is amount of bytes we get
i_samples_left = p_aout_buf ? p_aout_buf->i_nb_samples : 0;
- buffer_delay = p_sys->i_samples_delay * p_sys->i_sample_bytes * p_sys->p_context->channels;
+ buffer_delay = p_sys->i_samples_delay * p_sys->i_sample_bytes * p_enc->fmt_out.audio.i_channels;
//p_sys->i_buffer_out = p_sys->i_frame_size * chan * p_sys->i_sample_bytes
//Calculate how many bytes we would need from current buffer to fill frame
@@ -1418,12 +1418,12 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
p_sys->frame->channels = p_sys->p_context->channels;
const int in_bytes = p_sys->frame->nb_samples *
- p_sys->p_context->channels * p_sys->i_sample_bytes;
+ p_enc->fmt_out.audio.i_channels* p_sys->i_sample_bytes;
if( p_sys->b_planar )
{
aout_Deinterleave( p_sys->p_buffer, p_aout_buf->p_buffer,
- p_sys->frame->nb_samples, p_sys->p_context->channels, p_enc->fmt_in.i_codec );
+ p_sys->frame->nb_samples, p_enc->fmt_out.audio.i_channels, p_enc->fmt_in.i_codec );
}
else
@@ -1431,7 +1431,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
memcpy(p_sys->p_buffer, p_aout_buf->p_buffer, in_bytes);
}
- if( avcodec_fill_audio_frame( p_sys->frame, p_sys->p_context->channels,
+ if( avcodec_fill_audio_frame( p_sys->frame, p_enc->fmt_out.audio.i_channels,
p_sys->p_context->sample_fmt,
p_sys->p_buffer,
p_sys->i_buffer_out,
@@ -1457,7 +1457,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
if( p_aout_buf->i_nb_samples > 0 )
{
memcpy( p_sys->p_buffer + buffer_delay, p_aout_buf->p_buffer,
- p_aout_buf->i_nb_samples * p_sys->i_sample_bytes * p_sys->p_context->channels);
+ p_aout_buf->i_nb_samples * p_sys->i_sample_bytes * p_enc->fmt_out.audio.i_channels);
p_sys->i_samples_delay += p_aout_buf->i_nb_samples;
}
--
GitLab
From b8ad80a20e9e84082dac2848070d251fa68412c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= <fcvlcdev@free.fr>
Date: Tue, 23 Apr 2024 13:13:30 +0700
Subject: [PATCH 05/11] codec: avcodec: map AYUV as RAWVIDEO with ffmpeg 6.0
(cherry picked from commit 955ef939467a628eb8da08e0d5eaefc9a3484cba)
---
modules/codec/avcodec/fourcc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c
index 33c6cae09ab..97f3188211d 100644
--- a/modules/codec/avcodec/fourcc.c
+++ b/modules/codec/avcodec/fourcc.c
@@ -182,8 +182,12 @@ static const struct vlc_avcodec_fourcc video_codecs[] =
/* AV_CODEC_ID_V210X */
{ VLC_CODEC_TMV, AV_CODEC_ID_TMV },
{ VLC_CODEC_V210, AV_CODEC_ID_V210 },
-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 54, 50, 100 ) && LIBAVCODEC_VERSION_MICRO >= 100
+#if LIBAVCODEC_VERSION_MICRO >= 100
+# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 59, 42, 102 )
+ { VLC_CODEC_VUYA, AV_CODEC_ID_RAWVIDEO },
+# elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 54, 50, 100 )
{ VLC_CODEC_VUYA, AV_CODEC_ID_AYUV },
+# endif
#endif
/* AV_CODEC_ID_DPX */
{ VLC_CODEC_MAD, AV_CODEC_ID_MAD },
--
GitLab
From 58c05240c26b6eef56e7c5ab35b14ccd8377667f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= <fcvlcdev@free.fr>
Date: Thu, 13 Jun 2024 12:21:58 +0700
Subject: [PATCH 06/11] avcodec: encoder: fix channel_layout conditionals
---
modules/codec/avcodec/encoder.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 52848de0658..6bd58f5071d 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -43,12 +43,13 @@
#include <vlc_cpu.h>
#include <libavcodec/avcodec.h>
-#include <libavutil/channel_layout.h>
#include "avcodec.h"
#include "avcommon.h"
-#if LIBAVUTIL_VERSION_CHECK( 52,2,6,0,0 )
+#define API_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 100))
+
+#if API_CHANNEL_LAYOUT
# include <libavutil/channel_layout.h>
#endif
@@ -157,6 +158,7 @@ struct encoder_sys_t
/* Taken from audio.c*/
+#if API_CHANNEL_LAYOUT
static const uint64_t pi_channels_map[][2] =
{
{ AV_CH_FRONT_LEFT, AOUT_CHAN_LEFT },
@@ -193,6 +195,7 @@ static const uint32_t channel_mask[][2] = {
{AOUT_CHANS_7_1, AV_CH_LAYOUT_7POINT1},
{AOUT_CHANS_8_1, AV_CH_LAYOUT_OCTAGONAL},
};
+#endif
static const char *const ppsz_enc_options[] = {
"keyint", "bframes", "vt", "qmin", "qmax", "codec", "hq",
@@ -746,7 +749,7 @@ int InitVideoEnc( vlc_object_t *p_this )
p_context->time_base.num = 1;
p_context->time_base.den = p_context->sample_rate;
p_context->channels = p_enc->fmt_out.audio.i_channels;
-#if LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 0)
+#if API_CHANNEL_LAYOUT
p_context->channel_layout = channel_mask[p_context->channels][1];
/* Setup Channel ordering for multichannel audio
@@ -925,7 +928,9 @@ errmsg:
if( p_enc->fmt_out.audio.i_channels > 2 )
{
p_context->channels = 2;
+#if API_CHANNEL_LAYOUT
p_context->channel_layout = channel_mask[p_context->channels][1];
+#endif
/* Change fmt_in in order to ask for a channels conversion */
p_enc->fmt_in.audio.i_channels =
--
GitLab
From 3db6e677680a1a94e473fe9d9fc121af34cdcf2b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= <fcvlcdev@free.fr>
Date: Sat, 17 Aug 2024 11:22:33 +0700
Subject: [PATCH 07/11] codec: avcodec: fix audio channel_layout conditionals
---
modules/codec/avcodec/audio.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index ad8a40ab4ed..c74757c76ae 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -41,8 +41,11 @@
#include <libavcodec/avcodec.h>
#include <libavutil/mem.h>
-#include <libavutil/channel_layout.h>
+#define API_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 100))
+#if API_CHANNEL_LAYOUT
+# include <libavutil/channel_layout.h>
+#endif
/*****************************************************************************
* decoder_sys_t : decoder descriptor
@@ -598,7 +601,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
p_sys->i_previous_channels = p_sys->p_context->ch_layout.nb_channels;
p_sys->i_previous_layout = p_sys->p_context->ch_layout.u.mask;
}
-#else
+#elif API_CHANNEL_LAYOUT
if( p_sys->i_previous_channels == p_sys->p_context->channels &&
p_sys->i_previous_layout == p_sys->p_context->channel_layout )
return;
@@ -612,15 +615,19 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
const unsigned i_order_max = sizeof(pi_channels_map)/sizeof(*pi_channels_map);
uint32_t pi_order_src[i_order_max];
- int i_channels_src = 0;
+ int i_channels_src = 0, channel_count;
+ uint64_t channel_layout_mask;
#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
- uint64_t channel_layout_mask = p_sys->p_context->ch_layout.u.mask;
- int channel_count = p_sys->p_context->ch_layout.nb_channels;
-#else
- uint64_t channel_layout_mask =
+ channel_layout_mask = p_sys->p_context->ch_layout.u.mask;
+ channel_count = p_sys->p_context->ch_layout.nb_channels;
+#elif API_CHANNEL_LAYOUT
+ channel_layout_mask =
p_sys->p_context->channel_layout ? p_sys->p_context->channel_layout :
(uint64_t)av_get_default_channel_layout( p_sys->p_context->channels );
- int channel_count = p_sys->p_context->channels;
+ channel_count = p_sys->p_context->channels;
+#else
+ channel_layout_mask = NULL;
+ channel_count = p_sys->p_context->channels;
#endif
if( channel_layout_mask )
--
GitLab
From b5bb9bda03a06fc1cfd682dacb571b688b5558d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= <fcvlcdev@free.fr>
Date: Tue, 23 Apr 2024 13:14:53 +0700
Subject: [PATCH 08/11] demux/mux: avformat: use ch_layout from ffmpeg 5.1
merger pick from commit a55ec32ab3760d9edb6f05481cd3a981aa42878d
and fixup 195f0c98599b55950c49a62f98d9d3495be310df
---
modules/demux/avformat/demux.c | 4 ++++
modules/demux/avformat/mux.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 3b355bb3fae..830dc0157e2 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -401,7 +401,11 @@ int avformat_OpenDemux( vlc_object_t *p_this )
es_format_Init( &es_fmt, AUDIO_ES, fcc );
es_fmt.i_original_fourcc = CodecTagToFourcc( cp->codec_tag );
es_fmt.i_bitrate = cp->bit_rate;
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 59, 24, 100 ) && LIBAVCODEC_VERSION_MICRO >= 100
+ es_fmt.audio.i_channels = cp->ch_layout.nb_channels;
+#else
es_fmt.audio.i_channels = cp->channels;
+#endif
es_fmt.audio.i_rate = cp->sample_rate;
es_fmt.audio.i_bitspersample = cp->bits_per_coded_sample;
es_fmt.audio.i_blockalign = cp->block_align;
diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
index c708276954c..8bf8735885f 100644
--- a/modules/demux/avformat/mux.c
+++ b/modules/demux/avformat/mux.c
@@ -267,7 +267,11 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
case AUDIO_ES:
codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 59, 24, 100 ) && LIBAVCODEC_VERSION_MICRO >= 100
+ av_channel_layout_default( &codecpar->ch_layout, fmt->audio.i_channels );
+#else
codecpar->channels = fmt->audio.i_channels;
+#endif
codecpar->sample_rate = fmt->audio.i_rate;
stream->time_base = (AVRational){1, codecpar->sample_rate};
if (fmt->i_bitrate == 0) {
--
GitLab
From fa001cda7f6b22843438c39dfc078050bb54c72a Mon Sep 17 00:00:00 2001
From: Ilkka Ollakka <ileoo@videolan.org>
Date: Tue, 4 Jul 2023 16:53:43 +0300
Subject: [PATCH 09/11] avcodec: add handling of new ch_layout in audio encoder
conditioned to avcodec version where is it added
(cherry picked from commit c4302ca59dd79efd7208a45a3fcdc44388fd03a8)
---
modules/codec/avcodec/encoder.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 6bd58f5071d..757f93b4684 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -927,11 +927,14 @@ errmsg:
if( p_enc->fmt_out.audio.i_channels > 2 )
{
+#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
+ av_channel_layout_default( &p_context->ch_layout, 2 );
+#else
p_context->channels = 2;
-#if API_CHANNEL_LAYOUT
+# if API_CHANNEL_LAYOUT
p_context->channel_layout = channel_mask[p_context->channels][1];
+# endif
#endif
-
/* Change fmt_in in order to ask for a channels conversion */
p_enc->fmt_in.audio.i_channels =
p_enc->fmt_out.audio.i_channels = 2;
@@ -1288,8 +1291,12 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, uns
av_frame_unref( p_sys->frame );
p_sys->frame->format = p_sys->p_context->sample_fmt;
p_sys->frame->nb_samples = leftover_samples + p_sys->i_samples_delay;
+#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
+ av_channel_layout_copy(&p_sys->frame->ch_layout, &p_sys->p_context->ch_layout);
+#else
p_sys->frame->channel_layout = p_sys->p_context->channel_layout;
p_sys->frame->channels = p_sys->p_context->channels;
+#endif
p_sys->frame->pts = date_Get( &p_sys->buffer_date ) * p_sys->p_context->time_base.den /
CLOCK_FREQ / p_sys->p_context->time_base.num;
@@ -1419,8 +1426,12 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
p_sys->frame->pts = date_Get( &p_sys->buffer_date ) * p_sys->p_context->time_base.den /
CLOCK_FREQ / p_sys->p_context->time_base.num;
+#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
+ av_channel_layout_copy(&p_sys->frame->ch_layout, &p_sys->p_context->ch_layout);
+#else
p_sys->frame->channel_layout = p_sys->p_context->channel_layout;
p_sys->frame->channels = p_sys->p_context->channels;
+#endif
const int in_bytes = p_sys->frame->nb_samples *
p_enc->fmt_out.audio.i_channels* p_sys->i_sample_bytes;
--
GitLab
From bb62989ccc12866d308e6f38dc1513de9cb1c6da Mon Sep 17 00:00:00 2001
From: Ilkka Ollakka <ileoo@videolan.org>
Date: Tue, 4 Jul 2023 16:55:28 +0300
Subject: [PATCH 10/11] avcodec: use ch_layout for channel layout in audio
encoder
channels and channel_layout has been deprecated in FFMPEG 5.1 and will be removed eventually
also always create the mapping, as ch_layout is always there
(cherry picked from commit b73dc8841d999c6be9de718cd2cd3aeb13279792)
---
modules/codec/avcodec/encoder.c | 53 ++++++++++++++-------------------
1 file changed, 22 insertions(+), 31 deletions(-)
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 757f93b4684..ae746c99fc8 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -183,6 +183,7 @@ static const uint64_t pi_channels_map[][2] =
{ AV_CH_STEREO_RIGHT, 0 },
};
+# if !LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
static const uint32_t channel_mask[][2] = {
{0,0},
{AOUT_CHAN_CENTER, AV_CH_LAYOUT_MONO},
@@ -195,6 +196,7 @@ static const uint32_t channel_mask[][2] = {
{AOUT_CHANS_7_1, AV_CH_LAYOUT_7POINT1},
{AOUT_CHANS_8_1, AV_CH_LAYOUT_OCTAGONAL},
};
+# endif
#endif
static const char *const ppsz_enc_options[] = {
@@ -748,49 +750,36 @@ int InitVideoEnc( vlc_object_t *p_this )
date_Set( &p_sys->buffer_date, AV_NOPTS_VALUE );
p_context->time_base.num = 1;
p_context->time_base.den = p_context->sample_rate;
- p_context->channels = p_enc->fmt_out.audio.i_channels;
-#if API_CHANNEL_LAYOUT
- p_context->channel_layout = channel_mask[p_context->channels][1];
- /* Setup Channel ordering for multichannel audio
+ /* Setup Channel ordering for audio
* as VLC channel order isn't same as libavcodec expects
*/
p_sys->i_channels_to_reorder = 0;
- /* Specified order
+ /* Create channel layout for avcodec
* Copied from audio.c
*/
- const unsigned i_order_max = 8 * sizeof(p_context->channel_layout);
- uint32_t pi_order_dst[AOUT_CHAN_MAX] = { };
+#if API_CHANNEL_LAYOUT
+ uint32_t pi_order_dst[AOUT_CHAN_MAX] = { 0 };
uint32_t order_mask = 0;
int i_channels_src = 0;
-
- if( p_context->channel_layout )
- {
- msg_Dbg( p_enc, "Creating channel order for reordering");
- for( unsigned i = 0; i < sizeof(pi_channels_map)/sizeof(*pi_channels_map); i++ )
- {
- if( p_context->channel_layout & pi_channels_map[i][0] )
- {
- msg_Dbg( p_enc, "%d %"PRIx64" mapped to %"PRIx64"", i_channels_src, pi_channels_map[i][0], pi_channels_map[i][1]);
- pi_order_dst[i_channels_src++] = pi_channels_map[i][1];
- order_mask |= pi_channels_map[i][1];
- }
- }
- }
- else
+ msg_Dbg( p_enc, "Creating channel order for reordering");
+# if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
+ av_channel_layout_default( &p_context->ch_layout, p_enc->fmt_out.audio.i_channels );
+ uint64_t channel_mask = p_context->ch_layout.u.mask;
+# else
+ p_context->channels = p_enc->fmt_out.audio.i_channels;
+ p_context->channel_layout = channel_mask[p_context->channels][1];
+ uint64_t channel_mask = p_context->channel_layout;
+# endif
+ for( unsigned i = 0; i < sizeof(pi_channels_map)/sizeof(*pi_channels_map); i++ )
{
- msg_Dbg( p_enc, "Creating default channel order for reordering");
- /* Create default order */
- for( unsigned int i = 0; i < __MIN( i_order_max, (unsigned)p_sys->p_context->channels ); i++ )
+ if( channel_mask & pi_channels_map[i][0] )
{
- if( i < sizeof(pi_channels_map)/sizeof(*pi_channels_map) )
- {
- msg_Dbg( p_enc, "%d channel is %"PRIx64"", i_channels_src, pi_channels_map[i][1]);
- pi_order_dst[i_channels_src++] = pi_channels_map[i][1];
- order_mask |= pi_channels_map[i][1];
- }
+ msg_Dbg( p_enc, "%d %"PRIx64" mapped to %"PRIx64"", i_channels_src, pi_channels_map[i][0], pi_channels_map[i][1]);
+ pi_order_dst[i_channels_src++] = pi_channels_map[i][1];
+ order_mask |= pi_channels_map[i][1];
}
}
if( i_channels_src != p_enc->fmt_out.audio.i_channels )
@@ -799,6 +788,8 @@ int InitVideoEnc( vlc_object_t *p_this )
p_sys->i_channels_to_reorder =
aout_CheckChannelReorder( NULL, pi_order_dst, order_mask,
p_sys->pi_reorder_layout );
+#else
+ p_context->channels = p_enc->fmt_out.audio.i_channels;
#endif
if ( p_enc->fmt_out.i_codec == VLC_CODEC_MP4A )
--
GitLab
From e020f9abb31809584e33d740593d6ae5a190771d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= <fcvlcdev@free.fr>
Date: Mon, 12 Aug 2024 19:32:42 +0700
Subject: [PATCH 11/11] codec: avcodec: bypass removed define for Intel
workarounds
adapted from cherry picked commit 1280728ad305f00ceba3491ce11bf66107017a6c
---
modules/codec/avcodec/d3d11va.c | 4 ++++
modules/codec/avcodec/dxva2.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index e1560a9312c..5260628364f 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -55,6 +55,10 @@
#define D3D_DecoderSurface ID3D11VideoDecoderOutputView
#include "directx_va.h"
+#ifndef FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO
+# define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 // moved to libavcodec/dxva2_internal.h :/
+#endif
+
static int Open(vlc_va_t *, AVCodecContext *, const AVPixFmtDescriptor *, enum PixelFormat,
const es_format_t *, picture_sys_t *p_sys);
static void Close(vlc_va_t *, void **);
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 2e6809a0541..037ad7d4488 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -43,6 +43,10 @@
#define D3D_DecoderSurface IDirect3DSurface9
#include "directx_va.h"
+#ifndef FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO
+# define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 // moved to libavcodec/dxva2_internal.h :/
+#endif
+
static int Open(vlc_va_t *, AVCodecContext *, const AVPixFmtDescriptor *, enum PixelFormat,
const es_format_t *, picture_sys_t *p_sys);
static void Close(vlc_va_t *, void **);
--
GitLab

View file

@ -1,28 +0,0 @@
From a761e1c202b632e7865d18fcf11a2b9e285ea9ae Mon Sep 17 00:00:00 2001
From: Tristan Matthews <tmatth@videolan.org>
Date: Wed, 1 Feb 2023 23:39:36 -0500
Subject: [PATCH] opus_header: fix channel mapping family 1 parsing
Fixes #27808
(cherry picked from commit 79fa6af0a98921f9d34933761f4fe20ef6c35309)
---
modules/codec/opus_header.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/codec/opus_header.c b/modules/codec/opus_header.c
index 4069a5cf4613..b134b20b625b 100644
--- a/modules/codec/opus_header.c
+++ b/modules/codec/opus_header.c
@@ -205,7 +205,7 @@ int opus_header_parse(const unsigned char *packet, int len, OpusHeader *h)
h->nb_coupled = ch;
/* Multi-stream support */
- if(h->channel_mapping == 2)
+ if(h->channel_mapping <= 2)
{
if (h->nb_coupled + h->nb_streams > 255)
return 0;
--
GitLab

View file

@ -1,82 +0,0 @@
From a618e31cf209168ae420e95750734a37359969e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= <fcvlcdev@free.fr>
Date: Sun, 7 Jul 2024 11:14:05 +0200
Subject: [PATCH] mux: avformat: fix avio callbacks signature with ffmpeg 6.1
API signature changes introduced depending on a positive define,
then removed later, making it break prior or post removal...
(adapted from commit 503c04fad9239420be26d67aab4d5f63c53eb4f7)
---
modules/codec/avcodec/avcommon_compat.h | 3 +++
modules/demux/avformat/mux.c | 18 ++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h
index 9d16b3dc47d9..561ad83f99f9 100644
--- a/modules/codec/avcodec/avcommon_compat.h
+++ b/modules/codec/avcodec/avcommon_compat.h
@@ -77,6 +77,9 @@
#ifndef FF_MAX_B_FRAMES
# define FF_MAX_B_FRAMES 16 // FIXME: remove this
#endif
+#ifndef FF_API_AVIO_WRITE_NONCONST // removed in ffmpeg 7
+# define FF_API_AVIO_WRITE_NONCONST (LIBAVFORMAT_VERSION_MAJOR < 61)
+#endif
#endif /* HAVE_LIBAVCODEC_AVCODEC_H */
diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
index 8bf8735885f5..033a87bdaaad 100644
--- a/modules/demux/avformat/mux.c
+++ b/modules/demux/avformat/mux.c
@@ -74,11 +74,20 @@ static int AddStream( sout_mux_t *, sout_input_t * );
static void DelStream( sout_mux_t *, sout_input_t * );
static int Mux ( sout_mux_t * );
+#if FF_API_AVIO_WRITE_NONCONST
static int IOWrite( void *opaque, uint8_t *buf, int buf_size );
+#else
+static int IOWrite( void *opaque, const uint8_t *buf, int buf_size );
+#endif
static int64_t IOSeek( void *opaque, int64_t offset, int whence );
#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 )
+# if FF_API_AVIO_WRITE_NONCONST
static int IOWriteTyped(void *opaque, uint8_t *buf, int buf_size,
enum AVIODataMarkerType type, int64_t time);
+# else
+int IOWriteTyped(void *opaque, const uint8_t *buf, int buf_size,
+ enum AVIODataMarkerType type, int64_t time);
+# endif
#endif
/*****************************************************************************
@@ -411,8 +420,13 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
}
#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 )
+# if FF_API_AVIO_WRITE_NONCONST
int IOWriteTyped(void *opaque, uint8_t *buf, int buf_size,
enum AVIODataMarkerType type, int64_t time)
+# else
+int IOWriteTyped(void *opaque, const uint8_t *buf, int buf_size,
+ enum AVIODataMarkerType type, int64_t time)
+# endif
{
VLC_UNUSED(time);
@@ -512,7 +526,11 @@ static int Control( sout_mux_t *p_mux, int i_query, va_list args )
/*****************************************************************************
* I/O wrappers for libavformat
*****************************************************************************/
+#if FF_API_AVIO_WRITE_NONCONST
static int IOWrite( void *opaque, uint8_t *buf, int buf_size )
+#else
+static int IOWrite( void *opaque, const uint8_t *buf, int buf_size )
+#endif
{
sout_mux_t *p_mux = opaque;
sout_mux_sys_t *p_sys = p_mux->p_sys;
--
GitLab

1430
6273.patch

File diff suppressed because it is too large Load diff

View file

@ -1,46 +0,0 @@
From a945944c2d50cacfacdd5b16d4ea5e7b4766a9fc Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Mon, 16 Dec 2024 09:28:55 +0100
Subject: [PATCH] nfs: fix libnfs API v2 support
Introduced in libnfs 6.0.0.
Co-authored-by: ronnie sahlberg <ronniesahlberg@gmail.com>
Co-authored-by: Thomas Guillem <thomas@gllm.fr>
---
modules/access/nfs.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/access/nfs.c b/modules/access/nfs.c
index f164cda86499..3510c3fe1f14 100644
--- a/modules/access/nfs.c
+++ b/modules/access/nfs.c
@@ -188,7 +188,8 @@ nfs_read_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
else
{
p_sys->res.read.i_len = i_status;
- memcpy(p_sys->res.read.p_buf, p_data, i_status);
+ if (p_sys->res.read.p_buf != NULL && p_data != NULL)
+ memcpy(p_sys->res.read.p_buf, p_data, i_status);
}
}
@@ -208,9 +209,15 @@ FileRead(stream_t *p_access, void *p_buf, size_t i_len)
return 0;
p_sys->res.read.i_len = 0;
+#ifdef LIBNFS_API_V2
+ p_sys->res.read.p_buf = NULL;
+ if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, p_buf, i_len, nfs_read_cb,
+ p_access) < 0)
+#else
p_sys->res.read.p_buf = p_buf;
if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, i_len, nfs_read_cb,
p_access) < 0)
+#endif
{
msg_Err(p_access, "nfs_read_async failed");
return 0;
--
GitLab

View file

@ -1,149 +0,0 @@
From ba5dc03aecc1d96f81b76838f845ebde7348cf62 Mon Sep 17 00:00:00 2001
From: David Rosca <nowrep@gmail.com>
Date: Fri, 20 Dec 2024 20:24:36 +0100
Subject: [PATCH] avcodec: vaapi: Support VAAPI with latest FFmpeg
---
configure.ac | 20 +------------
modules/codec/Makefile.am | 2 +-
modules/codec/avcodec/avcommon_compat.h | 3 ++
modules/codec/avcodec/vaapi.c | 38 +++++++++++++++++++++++--
4 files changed, 41 insertions(+), 22 deletions(-)
diff --git a/configure.ac b/configure.ac
index 00afb063c455..089339e10e0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2550,25 +2550,7 @@ AM_CONDITIONAL([HAVE_VAAPI], [test "${have_vaapi}" = "yes"])
AM_CONDITIONAL([HAVE_VAAPI_DRM], [test "${have_vaapi_drm}" = "yes"])
AM_CONDITIONAL([HAVE_VAAPI_X11], [test "${have_vaapi_x11}" = "yes"])
AM_CONDITIONAL([HAVE_VAAPI_WL], [test "${have_vaapi_wl}" = "yes"])
-
-have_avcodec_vaapi="no"
-AS_IF([test "${have_vaapi}" = "yes" -a "${have_avcodec}" = "yes"], [
- VLC_SAVE_FLAGS
- CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
- CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
- AC_CHECK_HEADERS([libavcodec/vaapi.h], [
- AC_MSG_NOTICE([VA API acceleration activated])
- have_avcodec_vaapi="yes"
- ],[
- AS_IF([test -n "${enable_libva}"], [
- AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing])
- ], [
- AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ])
- ])
- ])
- VLC_RESTORE_FLAGS
-])
-AM_CONDITIONAL([HAVE_AVCODEC_VAAPI], [test "${have_avcodec_vaapi}" = "yes"])
+AM_CONDITIONAL([HAVE_AVCODEC_VAAPI], [test "${have_vaapi}" = "yes" -a "${have_avcodec}" = "yes"])
dnl
dnl dxva2 needs avcodec
diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am
index 6d9465fdaef9..dd04391c1bf7 100644
--- a/modules/codec/Makefile.am
+++ b/modules/codec/Makefile.am
@@ -416,7 +416,7 @@ libvaapi_plugin_la_SOURCES = \
codec/avcodec/vaapi.c hw/vaapi/vlc_vaapi.c hw/vaapi/vlc_vaapi.h
libvaapi_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
libvaapi_plugin_la_CFLAGS = $(AM_CFLAGS) $(AVCODEC_CFLAGS)
-libvaapi_plugin_la_LIBADD = $(LIBVA_LIBS)
+libvaapi_plugin_la_LIBADD = $(LIBVA_LIBS) $(AVCODEC_LIBS)
if HAVE_AVCODEC_VAAPI
if HAVE_VAAPI_DRM
codec_LTLIBRARIES += libvaapi_drm_plugin.la
diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h
index ac02c06d2339..8ab6910f3250 100644
--- a/modules/codec/avcodec/avcommon_compat.h
+++ b/modules/codec/avcodec/avcommon_compat.h
@@ -84,6 +84,9 @@
#ifndef FF_API_AVIO_WRITE_NONCONST // removed in ffmpeg 7
# define FF_API_AVIO_WRITE_NONCONST (LIBAVFORMAT_VERSION_MAJOR < 61)
#endif
+#ifndef FF_API_STRUCT_VAAPI_CONTEXT
+# define FF_API_STRUCT_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59)
+#endif
#endif /* HAVE_LIBAVCODEC_AVCODEC_H */
diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c
index c83269e43f30..e203baaf9ee2 100644
--- a/modules/codec/avcodec/vaapi.c
+++ b/modules/codec/avcodec/vaapi.c
@@ -42,12 +42,25 @@
# include <va/va_drm.h>
#endif
#include <libavcodec/avcodec.h>
+#if FF_API_STRUCT_VAAPI_CONTEXT
#include <libavcodec/vaapi.h>
+#else
+#include <libavutil/hwcontext_vaapi.h>
+#endif
#include "avcodec.h"
#include "va.h"
#include "../../hw/vaapi/vlc_vaapi.h"
+#if !FF_API_STRUCT_VAAPI_CONTEXT
+struct vaapi_context
+{
+ VADisplay display;
+ VAConfigID config_id;
+ VAContextID context_id;
+};
+#endif
+
struct vlc_va_sys_t
{
struct vlc_vaapi_instance *va_inst;
@@ -145,8 +158,10 @@ static void Delete(vlc_va_t *va, void **hwctx)
(void) hwctx;
- vlc_vaapi_DestroyContext(o, sys->hw_ctx.display, sys->hw_ctx.context_id);
- vlc_vaapi_DestroyConfig(o, sys->hw_ctx.display, sys->hw_ctx.config_id);
+ if (sys->hw_ctx.context_id != VA_INVALID_ID)
+ vlc_vaapi_DestroyContext(o, sys->hw_ctx.display, sys->hw_ctx.context_id);
+ if (sys->hw_ctx.config_id != VA_INVALID_ID)
+ vlc_vaapi_DestroyConfig(o, sys->hw_ctx.display, sys->hw_ctx.config_id);
vlc_vaapi_ReleaseInstance(sys->va_inst);
free(sys);
}
@@ -196,6 +211,7 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, const AVPixFmtDescriptor *d
sys->hw_ctx.config_id = VA_INVALID_ID;
sys->hw_ctx.context_id = VA_INVALID_ID;
+#if FF_API_STRUCT_VAAPI_CONTEXT
sys->hw_ctx.config_id =
vlc_vaapi_CreateConfigChecked(o, sys->hw_ctx.display, i_profile,
VAEntrypointVLD, i_vlc_chroma);
@@ -211,6 +227,24 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, const AVPixFmtDescriptor *d
goto error;
ctx->hwaccel_context = &sys->hw_ctx;
+#else
+ AVBufferRef *hwdev_ref = av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_VAAPI);
+ if (hwdev_ref == NULL)
+ goto error;
+
+ AVHWDeviceContext *hwdev_ctx = (void *) hwdev_ref->data;
+ AVVAAPIDeviceContext *vadev_ctx = hwdev_ctx->hwctx;
+ vadev_ctx->display = va_dpy;
+
+ if (av_hwdevice_ctx_init(hwdev_ref) < 0)
+ {
+ av_buffer_unref(&hwdev_ref);
+ goto error;
+ }
+
+ ctx->hw_device_ctx = hwdev_ref;
+#endif
+
va->sys = sys;
va->description = vaQueryVendorString(sys->hw_ctx.display);
va->get = Get;
--
GitLab

125
8921.patch Normal file
View file

@ -0,0 +1,125 @@
From 62b5f87ed9af884298fe6e637d5fa55d0fe246a5 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Thu, 5 Feb 2026 16:33:37 +0100
Subject: [PATCH 1/2] buildsystem: detect new libspatialaudio
We can use the presence of the version header to detect libspatialaudio
0.4.0 or higher. (For more granular checks in the future, the defines
from the version header can be checked)
(cherry picked from commit 93c2e6ec320016a3b3a3764db44fc7434d37d031) (edited)
edited:
- VLC 3 doesn't have meson
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
---
configure.ac | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/configure.ac b/configure.ac
index e3d5fc62790..ed8274f7c61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2895,6 +2895,15 @@ dnl Ambisonic channel mixer and binauralizer plugin
dnl
PKG_ENABLE_MODULES_VLC([SPATIALAUDIO], [], [spatialaudio], [Ambisonic channel mixer and binauralizer], [auto])
+AS_IF([test -n ${SPATIALAUDIO_CFLAGS+set}], [
+ VLC_SAVE_FLAGS
+ AX_APPEND_FLAG([$SPATIALAUDIO_CFLAGS], [CFLAGS])
+ AC_CHECK_HEADER([spatialaudio/SpatialaudioVersion.h], [
+ AX_APPEND_FLAG([-DHAVE_SPATIALAUDIOVERSION_H=1], [SPATIALAUDIO_CFLAGS])
+ ])
+ VLC_RESTORE_FLAGS
+])
+
dnl
dnl theora decoder plugin
dnl
--
GitLab
From ea82edcc10c2daad60fa4be8013eac25b7ed8f0f Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Thu, 5 Feb 2026 16:34:35 +0100
Subject: [PATCH 2/2] modules: spatialaudio: compat with new API
This merely makes it build with the new API and doesn't yet migrate
to newer APIs.
(cherry picked from commit a41efcaf1d0b799f0d85d2ca0c59a9c677153cc4) (rebased)
rebased:
- VLC 3 still has the spatialaudio-headphones option
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
---
.../channel_mixer/spatialaudio.cpp | 39 +++++++++++++++++--
1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/modules/audio_filter/channel_mixer/spatialaudio.cpp b/modules/audio_filter/channel_mixer/spatialaudio.cpp
index ec3b0e7489c..311ab0c462e 100644
--- a/modules/audio_filter/channel_mixer/spatialaudio.cpp
+++ b/modules/audio_filter/channel_mixer/spatialaudio.cpp
@@ -43,6 +43,23 @@
#include <spatialaudio/Ambisonics.h>
#include <spatialaudio/SpeakersBinauralizer.h>
+#ifdef HAVE_SPATIALAUDIOVERSION_H
+# include <spatialaudio/SpatialaudioVersion.h>
+#else
+# define SPATIALAUDIO_API_VERSION_MAJOR 0
+#endif
+
+#if SPATIALAUDIO_API_VERSION_MAJOR >= 2
+ using namespace spaudio;
+ using CAmbisonicBinauralizer = spaudio::AmbisonicBinauralizer;
+ using CAmbisonicDecoder = spaudio::AmbisonicDecoder;
+ using CAmbisonicProcessor = spaudio::AmbisonicProcessor;
+ using CAmbisonicZoomer = spaudio::AmbisonicZoomer;
+ using CAmbisonicSpeaker = spaudio::AmbisonicSpeaker;
+ using CBFormat = spaudio::BFormat;
+ #define kAmblib_CustomSpeakerSetUp Amblib_SpeakerSetUps::kAmblib_CustomSpeakerSetUp
+#endif
+
#define CFG_PREFIX "spatialaudio-"
#define DEFAULT_HRTF_PATH "hrtfs" DIR_SEP "dodeca_and_7channel_3DSL_HRTF.sofa"
@@ -460,10 +477,18 @@ static int Open(vlc_object_t *p_this)
p_sys->mode = filter_spatialaudio::AMBISONICS_DECODER;
unsigned i_nbChannels = aout_FormatNbChannels(&p_filter->fmt_out.audio);
- if (i_nbChannels == 1
- || !p_sys->speakerDecoder.Configure(p_sys->i_order, true,
- kAmblib_CustomSpeakerSetUp,
- i_nbChannels))
+ bool ok = false;
+ if (i_nbChannels > 1) {
+#if SPATIALAUDIO_API_VERSION_MAJOR >= 2
+ ok = p_sys->speakerDecoder.Configure(p_sys->i_order, true,
+ AMB_BLOCK_TIME_LEN, p_filter->fmt_in.audio.i_rate,
+ kAmblib_CustomSpeakerSetUp, i_nbChannels);
+#else
+ ok = p_sys->speakerDecoder.Configure(p_sys->i_order, true,
+ kAmblib_CustomSpeakerSetUp, i_nbChannels);
+#endif
+ }
+ if (!ok)
{
msg_Err(p_filter, "Error creating the Ambisonics decoder.");
delete p_sys;
@@ -509,7 +534,13 @@ static int Open(vlc_object_t *p_this)
return VLC_EGENERIC;
}
+#if SPATIALAUDIO_API_VERSION_MAJOR >= 2
+ if (!p_sys->zoomer.Configure(p_sys->i_order, true,
+ AMB_BLOCK_TIME_LEN,
+ p_filter->fmt_in.audio.i_rate))
+#else
if (!p_sys->zoomer.Configure(p_sys->i_order, true, 0))
+#endif
{
msg_Err(p_filter, "Error creating the ambisonic zoomer.");
delete p_sys;
--
GitLab

View file

@ -1,19 +1,15 @@
diff --git a/share/vlc.appdata.xml.in.in b/share/vlc.appdata.xml.in.in
diff --git a/share/org.videolan.vlc.appdata.xml.in.in b/share/org.videolan.vlc.appdata.xml.in.in
index cc9c39a..3c55620 100644
--- a/share/vlc.appdata.xml.in.in
+++ b/share/vlc.appdata.xml.in.in
@@ -18,7 +18,7 @@
--- a/share/org.videolan.vlc.appdata.xml.in.in
+++ b/share/org.videolan.vlc.appdata.xml.in.in
@@ -18,8 +18,9 @@
<url type="bugtracker">https://trac.videolan.org/vlc/</url>
<url type="donation">https://www.videolan.org/contribute.html</url>
<releases>
- <release version="@VERSION@" />
+ <release version="@VERSION@" date="@DATE@" />
</releases>
+ <replaces><id>org.videolan.VLC</id></replaces>
<provides>
<library>libvlc.so.5</library>
@@ -38,4 +38,5 @@
<image>http://images.videolan.org/vlc/screenshots/2.0.0/vlc-2.0-gnome3-debian.jpg</image>
</screenshot>
</screenshots>
+ <content_rating type="oars-1.1" />
</component>
</provides>

17
gstreamer128.patch Normal file
View file

@ -0,0 +1,17 @@
The addition of gstvideodmabufpool.h, which depends on gstvideopool.h,
causes this include to pull things in the wrong order.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10411
diff -up ./modules/codec/gstreamer/gstvlcvideopool.h.orig ./modules/codec/gstreamer/gstvlcvideopool.h
--- ./modules/codec/gstreamer/gstvlcvideopool.h.orig 2025-12-23 05:49:20.000000000 -0500
+++ ./modules/codec/gstreamer/gstvlcvideopool.h 2026-02-10 01:45:40.557003527 -0500
@@ -28,7 +28,7 @@
#define VLC_GST_VIDEO_POOL_H
#include <gst/gstbufferpool.h>
-#include <gst/video/gstvideopool.h>
+#include <gst/video/video.h>
#include "gstvlcpictureplaneallocator.h"

13
libupnp118.patch Normal file
View file

@ -0,0 +1,13 @@
diff --git a/modules/services_discovery/upnp.hpp b/modules/services_discovery/upnp.hpp
index b90e3cf..bc17189 100644
--- a/modules/services_discovery/upnp.hpp
+++ b/modules/services_discovery/upnp.hpp
@@ -37,7 +37,7 @@
#include <vlc_common.h>
#include <vlc_url.h>
-#if UPNP_VERSION < 10800
+#if (UPNP_VERSION < 10800) || (UPNP_VERSION >= 11800)
typedef void* UpnpEventPtr;
#else
typedef const void* UpnpEventPtr;

View file

@ -1,17 +0,0 @@
diff -up vlc-3.0.21/modules/access/live555.cpp.orig vlc-3.0.21/modules/access/live555.cpp
--- vlc-3.0.21/modules/access/live555.cpp.orig 2024-06-05 17:56:07.000000000 +0200
+++ vlc-3.0.21/modules/access/live555.cpp 2024-12-06 11:41:08.633053039 +0100
@@ -236,8 +236,13 @@ struct demux_sys_t
bool b_no_data; /* if we never received any data */
int i_no_data_ti; /* consecutive number of TaskInterrupt */
+#if LIVEMEDIA_LIBRARY_VERSION_INT >= 1732752000
+ std::atomic_char event_rtsp;
+ std::atomic_char event_data;
+#else
char event_rtsp;
char event_data;
+#endif
bool b_get_param; /* Does the server support GET_PARAMETER */
bool b_paused; /* Are we paused? */

View file

@ -1 +1 @@
SHA512 (vlc-3.0.21.tar.xz) = cb1af76c8056648c331d7e6e0680d161ed1849eb635987504f45eae02531e9b432651034317fa7e02b0722905dfb9f0f5dad67b5924cc62edcaf0d173ac36aee
SHA512 (vlc-3.0.23.tar.xz) = 557e4ac76a17158877a4a86f27c9a5bc189b7ac559687552117dc8b44961d1172cf93bf8e1eb70fecb05999bdfc3f69ab79b55126c71486fe3a8cdfbf92e6df6

104
vlc.spec
View file

@ -11,17 +11,19 @@
# not compatible with libplacebo-6
# https://code.videolan.org/videolan/vlc/-/merge_requests/3950
%bcond placebo %[!(0%{?fedora} >= 39 || 0%{?rhel} >= 10)]
# libpostproc was removed in FFmpeg 8 (F44+)
%bcond postproc %[!(0%{?fedora} >= 44 || 0%{?rhel} >= 11)]
# disabled due to various issues
%bcond projectm 0
# some dependencies are not yet in EPEL 10
%bcond daala %{undefined el10}
%bcond daala 1
%bcond lirc 1
%bcond schro %[!(0%{?rhel} >= 10)]
%bcond sdl %[!(0%{?rhel} >= 10)]
%ifnarch s390x
%bcond crystalhd %[0%{?fedora} || 0%{?rhel} < 9]
# retired from F43, was never in EPEL 9+
%bcond crystalhd 0
%bcond ieee1394 1
%endif
@ -29,29 +31,32 @@
%bcond vpl 1
%endif
#global commit f9020c4df073c861a28f0cda5c6c5dccb58a49ef
#global gitdate 20251124
%global app_id org.videolan.vlc
Name: vlc
Epoch: 1
Version: 3.0.21
Version: 3.0.23
Release: %autorelease
Summary: The cross-platform open-source multimedia framework, player and server
License: GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause
URL: https://www.videolan.org
%if 0%{?commit:1}
Source: https://code.videolan.org/videolan/vlc/-/archive/%{commit}/vlc-%{commit}.tar.bz2
%else
Source: https://get.videolan.org/vlc/%{version}/vlc-%{version}.tar.xz
%endif
Source: macros.vlc
## upstream patches
# opus_header: fix channel mapping family 1 parsing (rhbz#2307919)
Patch: https://code.videolan.org/videolan/vlc/-/merge_requests/5590.patch
# add support for ffmpeg 7.0 (without VAAPI)
Patch: https://code.videolan.org/videolan/vlc/-/merge_requests/5574.patch
# mux: avformat: fix avio callbacks signature with ffmpeg 6.1
Patch: https://code.videolan.org/videolan/vlc/-/merge_requests/6168.patch
# ffmpeg: backport more channel checks
Patch: https://code.videolan.org/videolan/vlc/-/merge_requests/6273.patch
# avcodec: vaapi: support VAAPI with latest FFmpeg
Patch: https://code.videolan.org/videolan/vlc/-/merge_requests/6606.patch
# nfs: fix libnfs API v2 support (rhbz#2341791)
Patch: https://code.videolan.org/videolan/vlc/-/merge_requests/6527.patch
# spatialaudio: fix compilation with libspatialaudio 4.0
Patch: 8921.patch
## backported patches from master
# freerdp: update to freerdp 2.0 api (#2278)
Patch: freerdp2.patch
## upstreamable patches
@ -68,12 +73,12 @@ Patch: appdata.patch
Patch: libidn2.patch
# fix deprecated lua math functions (rhbz#2280091)
Patch: lua-math.patch
# update to freerdp2 api; backport from master
Patch: freerdp2.patch
# fix build with live555-2024.11.28
Patch: live555.patch
# avoid "stale plugin cache" warnings in flatpaks
Patch: flatpak-cache.patch
# fix build with gstreamer-1.28
Patch: gstreamer128.patch
# fix build with libupnp-1.18
Patch: libupnp118.patch
%{load:%{S:1}}
%global __provides_exclude_from ^%{vlc_plugindir}/.*$
@ -86,7 +91,7 @@ BuildRequires: gcc-c++
BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib
BuildRequires: a52dec-devel
#BuildRequires: a52dec-devel
BuildRequires: aalib-devel
BuildRequires: faad2-devel
BuildRequires: hostname
@ -151,7 +156,7 @@ BuildRequires: pkgconfig(libchromaprint)
%if %{with ieee1394}
BuildRequires: pkgconfig(libdc1394-2) >= 2.1.0
%endif
BuildRequires: pkgconfig(libdca) >= 0.0.5
#BuildRequires: pkgconfig(libdca) >= 0.0.5
#BuildRequires: pkgconfig(libdsm) >= 0.2.0
BuildRequires: pkgconfig(libdvbpsi)
BuildRequires: pkgconfig(libebml) >= 1.3.6
@ -160,7 +165,7 @@ BuildRequires: pkgconfig(libgme)
BuildRequires: pkgconfig(libidn2)
BuildRequires: pkgconfig(libmatroska)
BuildRequires: pkgconfig(libmodplug) >= 0.8.9.0
BuildRequires: pkgconfig(libmpeg2) >= 0.3.2
#BuildRequires: pkgconfig(libmpeg2) >= 0.3.2
BuildRequires: pkgconfig(libmpg123)
BuildRequires: pkgconfig(libmtp) >= 1.0.0
BuildRequires: pkgconfig(libnfs) >= 1.10.0
@ -168,7 +173,9 @@ BuildRequires: pkgconfig(libnotify) pkgconfig(gtk+-3.0)
%if %{with placebo}
BuildRequires: pkgconfig(libplacebo) < 6
%endif
%if %{with postproc}
BuildRequires: pkgconfig(libpostproc)
%endif
%if %{with projectm}
BuildRequires: pkgconfig(libprojectM)
%endif
@ -207,9 +214,6 @@ BuildRequires: pkgconfig(Qt5Svg) >= 5.5
BuildRequires: pkgconfig(Qt5Widgets) >= 5.5
BuildRequires: pkgconfig(Qt5X11Extras) >= 5.5
BuildRequires: pkgconfig(samplerate)
%if %{with schro}
BuildRequires: pkgconfig(schroedinger-1.0) >= 1.0.10
%endif
%if %{with sdl}
BuildRequires: pkgconfig(SDL_image) >= 1.2.10
%endif
@ -381,6 +385,16 @@ Requires: google-noto-serif-vf-fonts
%endif
Recommends: libv4l%{?_isa}
Conflicts: %{name}-core < %{epoch}:%{version}-%{release}
%if %{without crystalhd}
Obsoletes: %{name}-plugin-crystalhd < %{epoch}:%{version}-%{release}
%endif
%if %{without ieee1394}
Obsoletes: %{name}-plugin-ieee1394 < %{epoch}:%{version}-%{release}
%endif
%if %{without opencv}
Obsoletes: %{name}-plugin-opencv < %{epoch}:%{version}-%{release}
%endif
%description plugins-base
VLC media player core components
@ -559,7 +573,7 @@ developing applications and plugins that use %{name}.
%prep
%autosetup -p1
%autosetup -p1 %{?commit:-n %{name}-%{commit}}
rm -f aclocal.m4 m4/lib*.m4 m4/lt*.m4
./bootstrap
@ -567,18 +581,16 @@ rm -f aclocal.m4 m4/lib*.m4 m4/lt*.m4
# switch "Allow automatic icon change" to opt-in
sed -i -e 's|\("qt-icon-change",\) true|\1 false|' modules/gui/qt/qt.cpp
# sync appstream app-id with Flathub
# fill in release date from appstream.patch
# https: https://code.videolan.org/videolan/vlc/-/merge_requests/1555 (4.0)
sed -e 's|org\.videolan\.vlc|org.videolan.VLC|' \
-e 's|@DATE@|%(date +%F -r %{S:0})|' \
sed -e 's|@DATE@|%(date +%F -r %{S:0})|' \
-e 's|http:|https:|g' \
-i share/vlc.appdata.xml.in.in
-i share/%{app_id}.appdata.xml.in.in
%if 0%{?flatpak}
# icons are renamed in order to be exported
sed -i -e '/icon_theme_load/s|"vlc"|"org.videolan.VLC"|' modules/notify/notify.c
sed -i -e '/fromTheme/s|"vlc"|"org.videolan.VLC"|' \
sed -i -e '/icon_theme_load/s|"vlc"|"%{app_id}"|' modules/notify/notify.c
sed -i -e '/fromTheme/s|"vlc"|"%{app_id}"|' \
modules/gui/qt/main_interface.cpp modules/gui/qt/qt.cpp
%endif
@ -641,17 +653,17 @@ export LIVE555_PREFIX=%{_prefix}
--enable-libva \
--enable-avformat \
--enable-swscale \
--enable-postproc \
--enable-postproc%{!?with_postproc:=no} \
--enable-faad \
--enable-aom \
--enable-dav1d \
--enable-vpx \
--enable-twolame \
--enable-fdkaac \
--enable-a52 \
--enable-dca \
--disable-a52 \
--disable-dca \
--enable-flac \
--enable-libmpeg2 \
--disable-libmpeg2 \
--enable-vorbis \
--enable-tremor \
--enable-speex \
@ -660,7 +672,6 @@ export LIVE555_PREFIX=%{_prefix}
--enable-theora \
--enable-oggspots \
--enable-daala%{!?with_daala:=no} \
--enable-schroedinger%{!?with_schro:=no} \
--enable-png \
--enable-jpeg \
--disable-bpg \
@ -778,7 +789,7 @@ rm -rf %{buildroot}%{_docdir}/vlc
%check
desktop-file-validate %{buildroot}%{_datadir}/applications/vlc.desktop
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/vlc.appdata.xml
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/%{app_id}.appdata.xml
# chroma_copy_test fails on s390x (big endian?)
%ifnarch s390x
@ -800,7 +811,7 @@ make check
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/solid/actions/%{name}-*.desktop
%{_datadir}/vlc/utils/
%{_metainfodir}/%{name}.appdata.xml
%{_metainfodir}/%{app_id}.appdata.xml
%files libs -f %{name}.lang
%license COPYING.LIB
@ -924,7 +935,6 @@ make check
%{vlc_plugindir}/audio_output/libafile_plugin.so
%{vlc_plugindir}/audio_output/libalsa_plugin.so
%{vlc_plugindir}/audio_output/libamem_plugin.so
%{vlc_plugindir}/codec/liba52_plugin.so
%{vlc_plugindir}/codec/libadpcm_plugin.so
%{vlc_plugindir}/codec/libaes3_plugin.so
%{vlc_plugindir}/codec/libaraw_plugin.so
@ -986,6 +996,7 @@ make check
%{vlc_plugindir}/demux/libdemuxdump_plugin.so
%{vlc_plugindir}/demux/libdiracsys_plugin.so
%{vlc_plugindir}/demux/libdirectory_demux_plugin.so
%{vlc_plugindir}/demux/libdmxmus_plugin.so
%{vlc_plugindir}/demux/libes_plugin.so
%{vlc_plugindir}/demux/libflacsys_plugin.so
%{vlc_plugindir}/demux/libh26x_plugin.so
@ -1097,8 +1108,12 @@ make check
%{vlc_plugindir}/text_renderer/libtdummy_plugin.so
%exclude %{vlc_plugindir}/video_chroma/libswscale_plugin.so
%{vlc_plugindir}/video_chroma/*.so
%if %{with postproc}
%exclude %{vlc_plugindir}/video_filter/libpostproc_plugin.so
%endif
%if %{with opencv}
%exclude %{vlc_plugindir}/video_filter/libopencv_*.so
%endif
%{vlc_plugindir}/video_filter/*.so
%{vlc_plugindir}/video_output/libfb_plugin.so
%{vlc_plugindir}/video_output/libvdummy_plugin.so
@ -1134,16 +1149,11 @@ make check
%if %{with daala}
%{vlc_plugindir}/codec/libdaala_plugin.so
%endif
%{vlc_plugindir}/codec/libdca_plugin.so
%{vlc_plugindir}/codec/libkate_plugin.so
%{vlc_plugindir}/codec/liblibass_plugin.so
%{vlc_plugindir}/codec/liblibmpeg2_plugin.so
%if %{with vpl}
%{vlc_plugindir}/codec/libqsv_plugin.so
%endif
%if %{with schro}
%{vlc_plugindir}/codec/libschroedinger_plugin.so
%endif
%if %{with sdl}
%{vlc_plugindir}/codec/libsdl_image_plugin.so
%endif
@ -1184,7 +1194,9 @@ make check
%{vlc_plugindir}/stream_out/libstream_out_chromaprint_plugin.so
%{vlc_plugindir}/vdpau/libvdpau_avcodec_plugin.so
%{vlc_plugindir}/video_chroma/libswscale_plugin.so
%if %{with postproc}
%{vlc_plugindir}/video_filter/libpostproc_plugin.so
%endif
%files plugin-fluidsynth
%{vlc_plugindir}/codec/libfluidsynth_plugin.so