From 0da0a64aaa9dccf49d908ec6b7869983bc9ad951dd532e7c3cebf399b24f699b Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 8 Aug 2025 13:10:06 +0000 Subject: [PATCH 1/7] Accepting request 1298149 from multimedia:libs OBS-URL: https://build.opensuse.org/request/show/1298149 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vlc?expand=0&rev=155 --- vlc.changes | 7 +++++++ vlc.spec | 25 +++++++++++++------------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/vlc.changes b/vlc.changes index e6e407d..f7fcbf4 100644 --- a/vlc.changes +++ b/vlc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Aug 7 09:27:34 UTC 2025 - Bjørn Lie + +- Drop obsolete and unused libxvidcore-devel BuildRequires. +- Switch faad build_cond to without and move plugin to main + package. + ------------------------------------------------------------------- Fri Jun 13 06:38:45 UTC 2025 - Dominique Leuenberger diff --git a/vlc.spec b/vlc.spec index f4897ea..2b1aae9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -29,7 +29,7 @@ %bcond_without fluidsynth # VNC support - the module is not really usable in most cases tested so far (e.g. against qemu-kvm -vnc :xx) %bcond_with vnc -%bcond_with faad +%bcond_without faad %define chromecast 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150600 %define dca 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150600 || 0%{?BUILD_ORIG} @@ -231,14 +231,14 @@ BuildRequires: pkgconfig(libchromaprint) >= 0.6.0 %if 0%{?suse_version} >= 1320 BuildRequires: pkgconfig(ncursesw) %endif -# Those are dependencies which are NOT provided in openSUSE, mostly for legal reasons. -%if 0%{?BUILD_ORIG} -BuildRequires: libxvidcore-devel -BuildRequires: pkgconfig(x264) >= 0.8.6 -BuildRequires: pkgconfig(x265) %if %{with faad} BuildRequires: pkgconfig(faad2) %endif + +# These are dependencies which are NOT provided in openSUSE, mostly for legal reasons. +%if 0%{?BUILD_ORIG} +BuildRequires: pkgconfig(x264) >= 0.8.6 +BuildRequires: pkgconfig(x265) %endif %description @@ -495,13 +495,14 @@ autoreconf -fiv %else --disable-wayland \ %endif -%if 0%{?BUILD_ORIG} %if %{with faad} --enable-faad \ -%endif - --enable-x265 \ %else --disable-faad \ +%endif +%if 0%{?BUILD_ORIG} + --enable-x265 \ +%else --disable-x265 \ %endif %{nil} @@ -895,6 +896,9 @@ fi %{_libdir}/vlc/plugins/codec/libddummy_plugin.so %{_libdir}/vlc/plugins/codec/libdvbsub_plugin.so %{_libdir}/vlc/plugins/codec/libedummy_plugin.so +%if %{with faad} +%{_libdir}/vlc/plugins/codec/libfaad_plugin.so +%endif %{_libdir}/vlc/plugins/codec/libfdkaac_plugin.so %{_libdir}/vlc/plugins/codec/libflac_plugin.so %{_libdir}/vlc/plugins/codec/libg711_plugin.so @@ -1221,9 +1225,6 @@ fi %if 0%{?BUILD_ORIG} %files codecs -%if %{with faad} -%{_libdir}/vlc/plugins/codec/libfaad_plugin.so -%endif %{_libdir}/vlc/plugins/codec/libx264_plugin.so %{_libdir}/vlc/plugins/codec/libx26410b_plugin.so %{_libdir}/vlc/plugins/codec/libx265_plugin.so -- 2.51.1 From f3e2b6924c56e77eb348acb7189b4b852f56ed69adb8da7525d66c4d90d52f3f Mon Sep 17 00:00:00 2001 From: Ana Guerrero Date: Mon, 25 Aug 2025 18:36:12 +0000 Subject: [PATCH 2/7] Accepting request 1300988 from multimedia:libs Add missing req (forwarded request 1300984 from iznogood) OBS-URL: https://build.opensuse.org/request/show/1300988 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vlc?expand=0&rev=156 --- 5574.patch | 775 ++++++++++++++++++++++++++++ 6168.patch | 82 +++ 6273.patch | 1430 +++++++++++++++++++++++++++++++++++++++++++++++++++ 6527.patch | 46 ++ 6606.patch | 149 ++++++ vlc.changes | 11 + vlc.spec | 61 ++- 7 files changed, 2533 insertions(+), 21 deletions(-) create mode 100644 5574.patch create mode 100644 6168.patch create mode 100644 6273.patch create mode 100644 6527.patch create mode 100644 6606.patch diff --git a/5574.patch b/5574.patch new file mode 100644 index 0000000..c1e92af --- /dev/null +++ b/5574.patch @@ -0,0 +1,775 @@ +From 81d6d56df6e5a66ed99970e2c559539858f4a0b7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= +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 50a76c7a18e1..e5af0ca5f2f8 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 +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 e5af0ca5f2f8..26166c084e51 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 +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 26166c084e51..ad8a40ab4ed6 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 +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 4919ccf0e0e4..52848de06587 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?= +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 33c6cae09abc..97f3188211d3 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?= +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 52848de06587..6bd58f5071d2 100644 +--- a/modules/codec/avcodec/encoder.c ++++ b/modules/codec/avcodec/encoder.c +@@ -43,12 +43,13 @@ + #include + + #include +-#include + + #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 + #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?= +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 ad8a40ab4ed6..c74757c76ae5 100644 +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -41,8 +41,11 @@ + #include + #include + +-#include ++#define API_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 100)) + ++#if API_CHANNEL_LAYOUT ++# include ++#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?= +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 3b355bb3faec..830dc0157e2b 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 c708276954ce..8bf8735885f5 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 +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 6bd58f5071d2..757f93b46845 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 +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 757f93b46845..ae746c99fc89 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?= +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 e1560a9312cc..5260628364f0 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 2e6809a05410..037ad7d44887 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 + diff --git a/6168.patch b/6168.patch new file mode 100644 index 0000000..201504f --- /dev/null +++ b/6168.patch @@ -0,0 +1,82 @@ +From a618e31cf209168ae420e95750734a37359969e1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= +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 + diff --git a/6273.patch b/6273.patch new file mode 100644 index 0000000..ebda997 --- /dev/null +++ b/6273.patch @@ -0,0 +1,1430 @@ +From 8fef83731a6b7324ffd03933272fcfd9b08a2cb0 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Thu, 7 Nov 2024 07:20:57 +0100 +Subject: [PATCH 01/15] avcommon: rename LIBAVUTIL_VERSION_CHECK to + LIBAV_UTIL_VERSION_CHECK + +The LIBAVUTIL_VERSION_CHECK form will be for checks also done in 4.0. + +No functional changes. +--- + modules/codec/avcodec/audio.c | 2 +- + modules/codec/avcodec/avcommon_compat.h | 6 +++--- + modules/codec/avcodec/chroma.c | 2 +- + modules/codec/avcodec/encoder.c | 2 +- + modules/codec/avcodec/va.c | 2 +- + modules/codec/avcodec/video.c | 6 +++--- + 6 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c +index c74757c76ae5..44335ec3cced 100644 +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -41,7 +41,7 @@ + #include + #include + +-#define API_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 100)) ++#define API_CHANNEL_LAYOUT (LIBAV_UTIL_VERSION_CHECK( 52, 2, 6, 0, 100)) + + #if API_CHANNEL_LAYOUT + # include +diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h +index 561ad83f99f9..bb2b9ae03e54 100644 +--- a/modules/codec/avcodec/avcommon_compat.h ++++ b/modules/codec/avcodec/avcommon_compat.h +@@ -86,15 +86,15 @@ + #ifdef HAVE_LIBAVUTIL_AVUTIL_H + # include + +-/* LIBAVUTIL_VERSION_CHECK checks for the right version of libav and FFmpeg ++/* LIBAV_UTIL_VERSION_CHECK checks for the right version of libav and FFmpeg + * a is the major version + * b and c the minor and micro versions of libav + * d and e the minor and micro versions of FFmpeg */ +-#define LIBAVUTIL_VERSION_CHECK( a, b, c, d, e ) \ ++#define LIBAV_UTIL_VERSION_CHECK( a, b, c, d, e ) \ + ( (LIBAVUTIL_VERSION_MICRO < 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ + (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) + +-#if !LIBAVUTIL_VERSION_CHECK( 52, 11, 0, 32, 100 ) ++#if !LIBAV_UTIL_VERSION_CHECK( 52, 11, 0, 32, 100 ) + # define AV_PIX_FMT_FLAG_HWACCEL PIX_FMT_HWACCEL + #endif + +diff --git a/modules/codec/avcodec/chroma.c b/modules/codec/avcodec/chroma.c +index cb9634db5970..da20bcb10b35 100644 +--- a/modules/codec/avcodec/chroma.c ++++ b/modules/codec/avcodec/chroma.c +@@ -180,7 +180,7 @@ static const struct + {VLC_CODEC_GBR_PLANAR_16B, AV_PIX_FMT_GBRP16BE, 0, 0, 0 }, + + /* XYZ */ +-#if LIBAVUTIL_VERSION_CHECK(52, 10, 0, 25, 100) ++#if LIBAV_UTIL_VERSION_CHECK(52, 10, 0, 25, 100) + {VLC_CODEC_XYZ12, AV_PIX_FMT_XYZ12, 0xfff0, 0xfff0, 0xfff0}, + #endif + { 0, 0, 0, 0, 0 } +diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c +index ae746c99fc89..c9a34d8f0da5 100644 +--- a/modules/codec/avcodec/encoder.c ++++ b/modules/codec/avcodec/encoder.c +@@ -47,7 +47,7 @@ + #include "avcodec.h" + #include "avcommon.h" + +-#define API_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 100)) ++#define API_CHANNEL_LAYOUT (LIBAV_UTIL_VERSION_CHECK( 52, 2, 6, 0, 100)) + + #if API_CHANNEL_LAYOUT + # include +diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c +index 0feb03b974fb..06de54ddcf0d 100644 +--- a/modules/codec/avcodec/va.c ++++ b/modules/codec/avcodec/va.c +@@ -58,7 +58,7 @@ vlc_fourcc_t vlc_va_GetChroma(enum PixelFormat hwfmt, enum PixelFormat swfmt) + } + break; + +-#if LIBAVUTIL_VERSION_CHECK(54, 13, 1, 24, 100) ++#if LIBAV_UTIL_VERSION_CHECK(54, 13, 1, 24, 100) + case AV_PIX_FMT_D3D11VA_VLD: + switch (swfmt) + { +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index 8c892dd3f484..deefd3076a9b 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -257,12 +257,12 @@ static int lavc_GetVideoFormat(decoder_t *dec, video_format_t *restrict fmt, + case AVCOL_TRC_BT2020_12: + fmt->transfer = TRANSFER_FUNC_BT2020; + break; +-#if LIBAVUTIL_VERSION_CHECK( 55, 14, 0, 31, 100) ++#if LIBAV_UTIL_VERSION_CHECK( 55, 14, 0, 31, 100) + case AVCOL_TRC_ARIB_STD_B67: + fmt->transfer = TRANSFER_FUNC_ARIB_B67; + break; + #endif +-#if LIBAVUTIL_VERSION_CHECK( 55, 17, 0, 37, 100) ++#if LIBAV_UTIL_VERSION_CHECK( 55, 17, 0, 37, 100) + case AVCOL_TRC_SMPTE2084: + fmt->transfer = TRANSFER_FUNC_SMPTE_ST2084; + break; +@@ -687,7 +687,7 @@ static int ffmpeg_OpenVa(decoder_t *p_dec, AVCodecContext *p_context, + static const enum PixelFormat hwfmts[] = + { + #ifdef _WIN32 +-#if LIBAVUTIL_VERSION_CHECK(54, 13, 1, 24, 100) ++#if LIBAV_UTIL_VERSION_CHECK(54, 13, 1, 24, 100) + AV_PIX_FMT_D3D11VA_VLD, + #endif + AV_PIX_FMT_DXVA2_VLD, +-- +GitLab + + +From 5efaca393b7388d629bba920127eb5465325c436 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Wed, 19 Jun 2024 13:56:31 +0200 +Subject: [PATCH 02/15] avcommon: use a specific macro to check the FFmpeg + libavutil version + +This macro doesn't check for libav which is assumed to not have to relevant +code. This is the same macro name used in VLC 4.0. +--- + modules/codec/avcodec/avcommon_compat.h | 6 +++++- + modules/codec/avcodec/chroma.c | 8 ++++---- + modules/codec/avcodec/video.c | 7 ++++--- + 3 files changed, 13 insertions(+), 8 deletions(-) + +diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h +index bb2b9ae03e54..5bade93b3c5f 100644 +--- a/modules/codec/avcodec/avcommon_compat.h ++++ b/modules/codec/avcodec/avcommon_compat.h +@@ -86,7 +86,11 @@ + #ifdef HAVE_LIBAVUTIL_AVUTIL_H + # include + +-/* LIBAV_UTIL_VERSION_CHECK checks for the right version of libav and FFmpeg ++/* check the FFmpeg libavutil version */ ++#define LIBAVUTIL_VERSION_CHECK( a, d, e ) \ ++ (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ++ ++/* LIBAV_UTIL_VERSION_CHECK checks for the right libavutil version of libav and FFmpeg + * a is the major version + * b and c the minor and micro versions of libav + * d and e the minor and micro versions of FFmpeg */ +diff --git a/modules/codec/avcodec/chroma.c b/modules/codec/avcodec/chroma.c +index da20bcb10b35..156fb0beec80 100644 +--- a/modules/codec/avcodec/chroma.c ++++ b/modules/codec/avcodec/chroma.c +@@ -86,7 +86,7 @@ static const struct + {VLC_CODEC_I420_9B, AV_PIX_FMT_YUV420P9BE, 0, 0, 0 }, + {VLC_CODEC_I420_10L, AV_PIX_FMT_YUV420P10LE, 0, 0, 0 }, + {VLC_CODEC_I420_10B, AV_PIX_FMT_YUV420P10BE, 0, 0, 0 }, +-#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) ) ++#if LIBAVUTIL_VERSION_CHECK( 54, 17, 100 ) + {VLC_CODEC_I420_12L, AV_PIX_FMT_YUV420P12LE, 0, 0, 0 }, + {VLC_CODEC_I420_12B, AV_PIX_FMT_YUV420P12BE, 0, 0, 0 }, + #endif +@@ -100,7 +100,7 @@ static const struct + {VLC_CODEC_I422_9B, AV_PIX_FMT_YUV422P9BE, 0, 0, 0 }, + {VLC_CODEC_I422_10L, AV_PIX_FMT_YUV422P10LE, 0, 0, 0 }, + {VLC_CODEC_I422_10B, AV_PIX_FMT_YUV422P10BE, 0, 0, 0 }, +-#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) ) ++#if LIBAVUTIL_VERSION_CHECK( 54, 17, 100 ) + {VLC_CODEC_I422_12L, AV_PIX_FMT_YUV422P12LE, 0, 0, 0 }, + {VLC_CODEC_I422_12B, AV_PIX_FMT_YUV422P12BE, 0, 0, 0 }, + #endif +@@ -116,7 +116,7 @@ static const struct + {VLC_CODEC_I444_9B, AV_PIX_FMT_YUV444P9BE, 0, 0, 0 }, + {VLC_CODEC_I444_10L, AV_PIX_FMT_YUV444P10LE, 0, 0, 0 }, + {VLC_CODEC_I444_10B, AV_PIX_FMT_YUV444P10BE, 0, 0, 0 }, +-#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) ) ++#if LIBAVUTIL_VERSION_CHECK( 54, 17, 100 ) + {VLC_CODEC_I444_12L, AV_PIX_FMT_YUV444P12LE, 0, 0, 0 }, + {VLC_CODEC_I444_12B, AV_PIX_FMT_YUV444P12BE, 0, 0, 0 }, + #endif +@@ -145,7 +145,7 @@ static const struct + VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_0BGR32, AV_PIX_FMT_0RGB32, 0x000000ff, 0x0000ff00, 0x00ff0000 ) + #endif + +-#if (LIBAVUTIL_VERSION_MICRO == 0 || LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 0, 100 ) ) ++#if (LIBAVUTIL_VERSION_MICRO == 0 || LIBAVUTIL_VERSION_CHECK( 55, 0, 100 ) ) + #ifdef WORDS_BIGENDIAN + {VLC_CODEC_RGBA64, AV_PIX_FMT_RGBA64BE, 0, 0, 0 }, + #else /* !WORDS_BIGENDIAN */ +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index deefd3076a9b..d3284da8aed5 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -39,7 +39,8 @@ + #include + #include + #include +-#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 16, 101 ) ) ++#include "avcommon_compat.h" ++#if LIBAVUTIL_VERSION_CHECK( 55, 16, 101 ) + #include + #endif + +@@ -995,7 +996,7 @@ static int DecodeSidedata( decoder_t *p_dec, const AVFrame *frame, picture_t *p_ + decoder_sys_t *p_sys = p_dec->p_sys; + bool format_changed = false; + +-#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 16, 101 ) ) ++#if LIBAVUTIL_VERSION_CHECK( 55, 16, 101 ) + #define FROM_AVRAT(default_factor, avrat) \ + (uint64_t)(default_factor) * (avrat).num / (avrat).den + const AVFrameSideData *metadata = +@@ -1050,7 +1051,7 @@ static int DecodeSidedata( decoder_t *p_dec, const AVFrame *frame, picture_t *p_ + #undef FROM_AVRAT + } + #endif +-#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 60, 100 ) ) ++#if LIBAVUTIL_VERSION_CHECK( 55, 60, 100 ) + const AVFrameSideData *metadata_lt = + av_frame_get_side_data( frame, + AV_FRAME_DATA_CONTENT_LIGHT_LEVEL ); +-- +GitLab + + +From 554a97ab33cd680b60731ec85fd9122329291725 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Thu, 7 Nov 2024 07:22:26 +0100 +Subject: [PATCH 03/15] avcommon: rename LIBAVFORMAT_VERSION_CHECK to + LIBAV_FORMAT_VERSION_CHECK + +The LIBAVFORMAT_VERSION_CHECK form will be for checks also done in 4.0. + +No functional changes. +--- + modules/codec/avcodec/avcommon_compat.h | 2 +- + modules/demux/avformat/mux.c | 10 +++++----- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h +index 5bade93b3c5f..d0096bc1bbb3 100644 +--- a/modules/codec/avcodec/avcommon_compat.h ++++ b/modules/codec/avcodec/avcommon_compat.h +@@ -126,7 +126,7 @@ + #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H + # include + +-#define LIBAVFORMAT_VERSION_CHECK( a, b, c, d, e ) \ ++#define LIBAV_FORMAT_VERSION_CHECK( a, b, c, d, e ) \ + ( (LIBAVFORMAT_VERSION_MICRO < 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ + (LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) + +diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c +index 033a87bdaaad..182e94587ad6 100644 +--- a/modules/demux/avformat/mux.c ++++ b/modules/demux/avformat/mux.c +@@ -61,7 +61,7 @@ struct sout_mux_sys_t + bool b_write_header; + bool b_write_keyframe; + bool b_error; +-#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) ++#if LIBAV_FORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) + bool b_header_done; + #endif + }; +@@ -80,7 +80,7 @@ static int IOWrite( void *opaque, uint8_t *buf, int buf_size ); + 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 LIBAV_FORMAT_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); +@@ -168,7 +168,7 @@ int avformat_OpenMux( vlc_object_t *p_this ) + p_sys->b_write_header = true; + p_sys->b_write_keyframe = false; + p_sys->b_error = false; +-#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) ++#if LIBAV_FORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) + p_sys->io->write_data_type = IOWriteTyped; + p_sys->b_header_done = false; + #endif +@@ -419,7 +419,7 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input ) + return VLC_SUCCESS; + } + +-#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) ++#if LIBAV_FORMAT_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) +@@ -545,7 +545,7 @@ static int IOWrite( void *opaque, const uint8_t *buf, int buf_size ) + + if( p_sys->b_write_header ) + p_buf->i_flags |= BLOCK_FLAG_HEADER; +-#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) ++#if LIBAV_FORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) + if( !p_sys->b_header_done ) + p_buf->i_flags |= BLOCK_FLAG_HEADER; + #endif +-- +GitLab + + +From d406a3127635afcba2436cbc9cbb3efbdc826331 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Wed, 19 Jun 2024 13:57:24 +0200 +Subject: [PATCH 04/15] avcommon: use a specific macro to check the FFmpeg + libavformat version + +This macro doesn't check for libav which is assumed to not have to relevant +code. This is the same macro name used in VLC 4.0. +--- + modules/codec/avcodec/avcommon.h | 2 +- + modules/codec/avcodec/avcommon_compat.h | 8 ++++++++ + modules/demux/avformat/demux.c | 3 +-- + modules/demux/avformat/mux.c | 11 ++++------- + 4 files changed, 14 insertions(+), 10 deletions(-) + +diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h +index ff5dba06c921..aa0c0b88b859 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_CHECK(58, 9, 100)) + av_register_all(); + #endif + +diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h +index d0096bc1bbb3..3feab3a657e5 100644 +--- a/modules/codec/avcodec/avcommon_compat.h ++++ b/modules/codec/avcodec/avcommon_compat.h +@@ -126,6 +126,14 @@ + #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H + # include + ++/* check the FFmpeg libavformat version */ ++#define LIBAVFORMAT_VERSION_CHECK( a, d, e ) \ ++ (LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ++ ++/* LIBAV_FORMAT_VERSION_CHECK checks for the right libavformat version of libav and FFmpeg ++ * a is the major version ++ * b and c the minor and micro versions of libav ++ * d and e the minor and micro versions of FFmpeg */ + #define LIBAV_FORMAT_VERSION_CHECK( a, b, c, d, e ) \ + ( (LIBAVFORMAT_VERSION_MICRO < 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ + (LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) +diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c +index 830dc0157e2b..39d2366cef2b 100644 +--- a/modules/demux/avformat/demux.c ++++ b/modules/demux/avformat/demux.c +@@ -52,8 +52,7 @@ + + # define HAVE_AVUTIL_CODEC_ATTACHMENT 1 + +-#if LIBAVFORMAT_VERSION_MICRO >= 100 && \ +- LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(59, 0, 100) ++#if LIBAVFORMAT_VERSION_CHECK(59, 0, 100) + # define AVF_MAYBE_CONST const + #else + # define AVF_MAYBE_CONST +diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c +index 182e94587ad6..664a646734c0 100644 +--- a/modules/demux/avformat/mux.c ++++ b/modules/demux/avformat/mux.c +@@ -95,8 +95,7 @@ int IOWriteTyped(void *opaque, const uint8_t *buf, int buf_size, + *****************************************************************************/ + int avformat_OpenMux( vlc_object_t *p_this ) + { +-#if LIBAVFORMAT_VERSION_MICRO >= 100 && \ +- LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(59, 0, 100) ++#if LIBAVFORMAT_VERSION_CHECK(59, 0, 100) + const AVOutputFormat *file_oformat; + #else + AVOutputFormat *file_oformat; +@@ -104,8 +103,7 @@ int avformat_OpenMux( vlc_object_t *p_this ) + sout_mux_t *p_mux = (sout_mux_t*)p_this; + bool dummy = !strcmp( p_mux->p_access->psz_access, "dummy"); + +-#if ( (LIBAVFORMAT_VERSION_MICRO >= 100) \ +- && (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 7, 100)) ) ++#if LIBAVFORMAT_VERSION_MICRO >= 100 && !(LIBAVFORMAT_VERSION_CHECK(58, 7, 100)) + if( dummy && strlen(p_mux->p_access->psz_path) + >= sizeof (((AVFormatContext *)NULL)->filename) ) + return VLC_EGENERIC; +@@ -144,8 +142,7 @@ int avformat_OpenMux( vlc_object_t *p_this ) + p_sys->oc->oformat = file_oformat; + /* If we use dummy access, let avformat write output */ + if( dummy ) +-#if ( (LIBAVFORMAT_VERSION_MICRO >= 100) \ +- && (LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(58, 7, 100)) ) ++#if LIBAVFORMAT_VERSION_CHECK(58, 7, 100) + p_sys->oc->url = av_strdup(p_mux->p_access->psz_path); + #else + strcpy( p_sys->oc->filename, p_mux->p_access->psz_path ); +@@ -397,7 +394,7 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input ) + pkt->dts = p_data->i_dts * p_stream->time_base.den / + CLOCK_FREQ / p_stream->time_base.num; + +-#if LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(59, 2, 103) ++#if LIBAVFORMAT_VERSION_MICRO >= 100 && !(LIBAVFORMAT_VERSION_CHECK(59, 2, 103)) + /* 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; +-- +GitLab + + +From 930ddc0d0fec55fff6c2ed0ffcc904773bae6622 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Thu, 7 Nov 2024 07:23:27 +0100 +Subject: [PATCH 05/15] avcommon: rename LIBAVCODEC_VERSION_CHECK to + LIBAV_CODEC_VERSION_CHECK + +The LIBAVCODEC_VERSION_CHECK form will be for checks also done in 4.0. + +No functional changes. +--- + modules/codec/avcodec/audio.c | 8 ++++---- + modules/codec/avcodec/avcommon_compat.h | 4 ++-- + modules/codec/avcodec/d3d11va.c | 4 ++-- + modules/codec/avcodec/encoder.c | 10 +++++----- + modules/codec/avcodec/fourcc.c | 14 +++++++------- + modules/codec/avcodec/video.c | 2 +- + 6 files changed, 21 insertions(+), 21 deletions(-) + +diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c +index 44335ec3cced..7a979e96e191 100644 +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -142,7 +142,7 @@ 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) ++#if LIBAV_CODEC_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; +@@ -402,7 +402,7 @@ 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) ++#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) + int channels = frame->ch_layout.nb_channels; + #else + int channels = ctx->channels; +@@ -592,7 +592,7 @@ 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 LIBAV_CODEC_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; +@@ -617,7 +617,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) + + int i_channels_src = 0, channel_count; + uint64_t channel_layout_mask; +-#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100) ++#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) + 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 +diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h +index 3feab3a657e5..b504fcd82186 100644 +--- a/modules/codec/avcodec/avcommon_compat.h ++++ b/modules/codec/avcodec/avcommon_compat.h +@@ -30,11 +30,11 @@ + #ifdef HAVE_LIBAVCODEC_AVCODEC_H + #include + +-/* LIBAVCODEC_VERSION_CHECK checks for the right version of libav and FFmpeg ++/* LIBAV_CODEC_VERSION_CHECK checks for the right version of libav and FFmpeg + * a is the major version + * b and c the minor and micro versions of libav + * d and e the minor and micro versions of FFmpeg */ +-#define LIBAVCODEC_VERSION_CHECK( a, b, c, d, e ) \ ++#define LIBAV_CODEC_VERSION_CHECK( a, b, c, d, e ) \ + ( (LIBAVCODEC_VERSION_MICRO < 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ + (LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) + +diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c +index 5260628364f0..e1c10d31188e 100644 +--- a/modules/codec/avcodec/d3d11va.c ++++ b/modules/codec/avcodec/d3d11va.c +@@ -76,7 +76,7 @@ vlc_module_end() + * So we get the surfaces from the decoder pool when needed. We don't need to + * extract the decoded surface into the decoder picture anymore. + */ +-#define D3D11_DIRECT_DECODE LIBAVCODEC_VERSION_CHECK( 57, 30, 3, 72, 101 ) ++#define D3D11_DIRECT_DECODE LIBAV_CODEC_VERSION_CHECK( 57, 30, 3, 72, 101 ) + + #include /* must be last included to not redefine existing GUIDs */ + +@@ -764,7 +764,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id, + assert(texDesc.Format == sys->render); + assert(texDesc.BindFlags & D3D11_BIND_DECODER); + +-#if !LIBAVCODEC_VERSION_CHECK( 57, 27, 2, 61, 102 ) ++#if !LIBAV_CODEC_VERSION_CHECK( 57, 27, 2, 61, 102 ) + if (pic->p_sys->slice_index != surface_idx) + { + msg_Warn(va, "d3d11va requires decoding slices to be the first in the texture (%d/%d)", +diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c +index c9a34d8f0da5..9cf9a7d0607d 100644 +--- a/modules/codec/avcodec/encoder.c ++++ b/modules/codec/avcodec/encoder.c +@@ -183,7 +183,7 @@ static const uint64_t pi_channels_map[][2] = + { AV_CH_STEREO_RIGHT, 0 }, + }; + +-# if !LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100) ++# if !LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) + static const uint32_t channel_mask[][2] = { + {0,0}, + {AOUT_CHAN_CENTER, AV_CH_LAYOUT_MONO}, +@@ -765,7 +765,7 @@ int InitVideoEnc( vlc_object_t *p_this ) + uint32_t order_mask = 0; + int i_channels_src = 0; + msg_Dbg( p_enc, "Creating channel order for reordering"); +-# if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100) ++# if LIBAV_CODEC_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 +@@ -918,7 +918,7 @@ errmsg: + + if( p_enc->fmt_out.audio.i_channels > 2 ) + { +-#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100) ++#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) + av_channel_layout_default( &p_context->ch_layout, 2 ); + #else + p_context->channels = 2; +@@ -1282,7 +1282,7 @@ 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) ++#if LIBAV_CODEC_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; +@@ -1417,7 +1417,7 @@ 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) ++#if LIBAV_CODEC_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; +diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c +index 97f3188211d3..3aea6b58ff04 100644 +--- a/modules/codec/avcodec/fourcc.c ++++ b/modules/codec/avcodec/fourcc.c +@@ -230,7 +230,7 @@ static const struct vlc_avcodec_fourcc video_codecs[] = + { VLC_CODEC_CLLC, AV_CODEC_ID_CLLC }, + { VLC_CODEC_MSS2, AV_CODEC_ID_MSS2 }, + { VLC_CODEC_VP9, AV_CODEC_ID_VP9 }, +-#if LIBAVCODEC_VERSION_CHECK( 57, 26, 0, 83, 101 ) ++#if LIBAV_CODEC_VERSION_CHECK( 57, 26, 0, 83, 101 ) + { VLC_CODEC_AV1, AV_CODEC_ID_AV1 }, + #endif + { VLC_CODEC_ICOD, AV_CODEC_ID_AIC }, +@@ -285,19 +285,19 @@ static const struct vlc_avcodec_fourcc video_codecs[] = + /* ffmpeg only: AV_CODEC_ID_SNOW */ + /* ffmpeg only: AV_CODEC_ID_SMVJPEG */ + +-#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 24, 102 ) ++#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 24, 102 ) + { VLC_CODEC_CINEFORM, AV_CODEC_ID_CFHD }, + #endif + +-#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 70, 100 ) ++#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 70, 100 ) + { VLC_CODEC_PIXLET, AV_CODEC_ID_PIXLET }, + #endif + +-#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 101 ) ++#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 71, 101 ) + { VLC_CODEC_SPEEDHQ, AV_CODEC_ID_SPEEDHQ }, + #endif + +-#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 79, 100 ) ++#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 79, 100 ) + { VLC_CODEC_FMVC, AV_CODEC_ID_FMVC }, + #endif + }; +@@ -414,7 +414,7 @@ static const struct vlc_avcodec_fourcc audio_codecs[] = + /* AV_CODEC_ID_WESTWOOD_SND1 */ + { VLC_CODEC_GSM, AV_CODEC_ID_GSM }, + { VLC_CODEC_QDM2, AV_CODEC_ID_QDM2 }, +-#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) ++#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) + { VLC_CODEC_QDMC, AV_CODEC_ID_QDMC }, + #endif + { VLC_CODEC_COOK, AV_CODEC_ID_COOK }, +@@ -482,7 +482,7 @@ static const struct vlc_avcodec_fourcc spu_codecs[] = + { VLC_CODEC_SSA, AV_CODEC_ID_SSA }, + /* AV_CODEC_ID_MOV_TEXT */ + { VLC_CODEC_BD_PG, AV_CODEC_ID_HDMV_PGS_SUBTITLE }, +-#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) ++#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) + { VLC_CODEC_BD_TEXT, AV_CODEC_ID_HDMV_TEXT_SUBTITLE }, + #endif + { VLC_CODEC_TELETEXT, AV_CODEC_ID_DVB_TELETEXT }, +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index d3284da8aed5..552c602edf6a 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -1307,7 +1307,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error + } + + /* Compute the PTS */ +-#if LIBAVCODEC_VERSION_CHECK(57, 24, 0, 61, 100) ++#if LIBAV_CODEC_VERSION_CHECK(57, 24, 0, 61, 100) + # if LIBAVCODEC_VERSION_MICRO >= 100 + vlc_tick_t i_pts = frame->best_effort_timestamp; + # else +-- +GitLab + + +From ce084152c9bade041ca18e19c3b264e4e134c6c3 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Wed, 19 Jun 2024 13:59:15 +0200 +Subject: [PATCH 06/15] avcommon: use a specific macro to check the FFmpeg + libavcodec version + +This macro doesn't check for libav which is assumed to not have to relevant +code. This is the same macro name used in VLC 4.0. +--- + modules/codec/avcodec/audio.c | 8 ++++---- + modules/codec/avcodec/avcommon.h | 2 +- + modules/codec/avcodec/avcommon_compat.h | 4 ++++ + modules/codec/avcodec/directx_va.c | 4 ++-- + modules/codec/avcodec/encoder.c | 13 ++++++------- + modules/codec/avcodec/fourcc.c | 18 ++++++++---------- + modules/codec/avcodec/video.c | 3 +-- + modules/demux/avformat/demux.c | 2 +- + modules/demux/avformat/mux.c | 2 +- + 9 files changed, 28 insertions(+), 28 deletions(-) + +diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c +index 7a979e96e191..a3f67f7bd934 100644 +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -142,7 +142,7 @@ static int OpenAudioCodec( decoder_t *p_dec ) + } + + ctx->sample_rate = p_dec->fmt_in.audio.i_rate; +-#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) ++#if LIBAVCODEC_VERSION_CHECK(59, 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; +@@ -402,7 +402,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block ) + ret = avcodec_receive_frame( ctx, frame ); + if( ret == 0 ) + { +-#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) ++#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) + int channels = frame->ch_layout.nb_channels; + #else + int channels = ctx->channels; +@@ -592,7 +592,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) + p_dec->fmt_out.audio.i_rate = p_sys->p_context->sample_rate; + + /* */ +-#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) ++#if LIBAVCODEC_VERSION_CHECK(59, 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; +@@ -617,7 +617,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) + + int i_channels_src = 0, channel_count; + uint64_t channel_layout_mask; +-#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) ++#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) + 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 +diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h +index aa0c0b88b859..10ad13dc5f8a 100644 +--- a/modules/codec/avcodec/avcommon.h ++++ b/modules/codec/avcodec/avcommon.h +@@ -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_CHECK(58, 10, 100)) + avcodec_register_all(); + #endif + +diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h +index b504fcd82186..ac02c06d2339 100644 +--- a/modules/codec/avcodec/avcommon_compat.h ++++ b/modules/codec/avcodec/avcommon_compat.h +@@ -30,6 +30,10 @@ + #ifdef HAVE_LIBAVCODEC_AVCODEC_H + #include + ++/* check the FFmpeg libavutil version */ ++#define LIBAVCODEC_VERSION_CHECK( a, d, e ) \ ++ (LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ++ + /* LIBAV_CODEC_VERSION_CHECK checks for the right version of libav and FFmpeg + * a is the major version + * b and c the minor and micro versions of libav +diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c +index 5b7980fd97df..36a5d61a5590 100644 +--- a/modules/codec/avcodec/directx_va.c ++++ b/modules/codec/avcodec/directx_va.c +@@ -284,7 +284,7 @@ static const directx_va_mode_t DXVA_MODES[] = { + + /* VPx */ + { "VP8", &DXVA_ModeVP8_VLD, 8, 0, NULL }, +-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 57, 17, 100 ) && LIBAVCODEC_VERSION_MICRO >= 100 ++#if LIBAVCODEC_VERSION_CHECK( 57, 17, 100 ) + { "VP9 profile 0", &DXVA_ModeVP9_VLD_Profile0, 8, AV_CODEC_ID_VP9, PROF_VP9_MAIN }, + { "VP9 profile 2", &DXVA_ModeVP9_VLD_10bit_Profile2, 10, AV_CODEC_ID_VP9, PROF_VP9_10 }, + #else +@@ -294,7 +294,7 @@ static const directx_va_mode_t DXVA_MODES[] = { + { "VP9 profile Intel", &DXVA_ModeVP9_VLD_Intel, 8, 0, NULL }, + + /* AV1 */ +-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 58, 112, 103 ) && LIBAVCODEC_VERSION_MICRO >= 100 ++#if LIBAVCODEC_VERSION_CHECK( 58, 112, 103 ) + { "AV1 Main profile 8", &DXVA_ModeAV1_VLD_Profile0, 8, AV_CODEC_ID_AV1, PROF_AV1_MAIN }, + { "AV1 Main profile 10", &DXVA_ModeAV1_VLD_Profile0, 10, AV_CODEC_ID_AV1, PROF_AV1_MAIN }, + { "AV1 High profile 8", &DXVA_ModeAV1_VLD_Profile1, 8, AV_CODEC_ID_AV1, PROF_AV1_HIGH }, +diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c +index 9cf9a7d0607d..2014b8afaf52 100644 +--- a/modules/codec/avcodec/encoder.c ++++ b/modules/codec/avcodec/encoder.c +@@ -61,8 +61,7 @@ + + #define RAW_AUDIO_FRAME_SIZE (2048) + +-#if LIBAVCODEC_VERSION_MICRO >= 100 && \ +- LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59, 0, 100) ++#if LIBAVCODEC_VERSION_CHECK(59, 0, 100) + # define AVC_MAYBE_CONST const + #else + # define AVC_MAYBE_CONST +@@ -183,7 +182,7 @@ static const uint64_t pi_channels_map[][2] = + { AV_CH_STEREO_RIGHT, 0 }, + }; + +-# if !LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) ++# if !LIBAVCODEC_VERSION_CHECK(59, 24, 100) + static const uint32_t channel_mask[][2] = { + {0,0}, + {AOUT_CHAN_CENTER, AV_CH_LAYOUT_MONO}, +@@ -765,7 +764,7 @@ int InitVideoEnc( vlc_object_t *p_this ) + uint32_t order_mask = 0; + int i_channels_src = 0; + msg_Dbg( p_enc, "Creating channel order for reordering"); +-# if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) ++# if LIBAVCODEC_VERSION_CHECK(59, 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 +@@ -918,7 +917,7 @@ errmsg: + + if( p_enc->fmt_out.audio.i_channels > 2 ) + { +-#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) ++#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) + av_channel_layout_default( &p_context->ch_layout, 2 ); + #else + p_context->channels = 2; +@@ -1282,7 +1281,7 @@ 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 LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) ++#if LIBAVCODEC_VERSION_CHECK(59, 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; +@@ -1417,7 +1416,7 @@ 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 LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) ++#if LIBAVCODEC_VERSION_CHECK(59, 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; +diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c +index 3aea6b58ff04..d75c21ffa495 100644 +--- a/modules/codec/avcodec/fourcc.c ++++ b/modules/codec/avcodec/fourcc.c +@@ -182,12 +182,10 @@ 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_MICRO >= 100 +-# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 59, 42, 102 ) ++#if LIBAVCODEC_VERSION_CHECK( 59, 42, 102 ) + { VLC_CODEC_VUYA, AV_CODEC_ID_RAWVIDEO }, +-# elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 54, 50, 100 ) ++#elif LIBAVCODEC_VERSION_CHECK( 54, 50, 100 ) + { VLC_CODEC_VUYA, AV_CODEC_ID_AYUV }, +-# endif + #endif + /* AV_CODEC_ID_DPX */ + { VLC_CODEC_MAD, AV_CODEC_ID_MAD }, +@@ -285,19 +283,19 @@ static const struct vlc_avcodec_fourcc video_codecs[] = + /* ffmpeg only: AV_CODEC_ID_SNOW */ + /* ffmpeg only: AV_CODEC_ID_SMVJPEG */ + +-#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 24, 102 ) ++#if LIBAVCODEC_VERSION_CHECK( 57, 24, 102 ) + { VLC_CODEC_CINEFORM, AV_CODEC_ID_CFHD }, + #endif + +-#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 70, 100 ) ++#if LIBAVCODEC_VERSION_CHECK( 57, 70, 100 ) + { VLC_CODEC_PIXLET, AV_CODEC_ID_PIXLET }, + #endif + +-#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 71, 101 ) ++#if LIBAVCODEC_VERSION_CHECK( 57, 71, 101 ) + { VLC_CODEC_SPEEDHQ, AV_CODEC_ID_SPEEDHQ }, + #endif + +-#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 79, 100 ) ++#if LIBAVCODEC_VERSION_CHECK( 57, 79, 100 ) + { VLC_CODEC_FMVC, AV_CODEC_ID_FMVC }, + #endif + }; +@@ -414,7 +412,7 @@ static const struct vlc_avcodec_fourcc audio_codecs[] = + /* AV_CODEC_ID_WESTWOOD_SND1 */ + { VLC_CODEC_GSM, AV_CODEC_ID_GSM }, + { VLC_CODEC_QDM2, AV_CODEC_ID_QDM2 }, +-#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) ++#if LIBAVCODEC_VERSION_CHECK( 57, 71, 100 ) + { VLC_CODEC_QDMC, AV_CODEC_ID_QDMC }, + #endif + { VLC_CODEC_COOK, AV_CODEC_ID_COOK }, +@@ -482,7 +480,7 @@ static const struct vlc_avcodec_fourcc spu_codecs[] = + { VLC_CODEC_SSA, AV_CODEC_ID_SSA }, + /* AV_CODEC_ID_MOV_TEXT */ + { VLC_CODEC_BD_PG, AV_CODEC_ID_HDMV_PGS_SUBTITLE }, +-#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) ++#if LIBAVCODEC_VERSION_CHECK( 57, 71, 100 ) + { VLC_CODEC_BD_TEXT, AV_CODEC_ID_HDMV_TEXT_SUBTITLE }, + #endif + { VLC_CODEC_TELETEXT, AV_CODEC_ID_DVB_TELETEXT }, +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index 552c602edf6a..c306e916c7d6 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -1824,8 +1824,7 @@ no_reuse: + if (!can_hwaccel) + return swfmt; + +-#if (LIBAVCODEC_VERSION_MICRO >= 100) \ +- && (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57, 83, 101)) ++#if (LIBAVCODEC_VERSION_MICRO >= 100) && !(LIBAVCODEC_VERSION_CHECK(57, 83, 101)) + if (p_context->active_thread_type) + { + msg_Warn(p_dec, "thread type %d: disabling hardware acceleration", +diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c +index 39d2366cef2b..9975b0f47b67 100644 +--- a/modules/demux/avformat/demux.c ++++ b/modules/demux/avformat/demux.c +@@ -400,7 +400,7 @@ 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 ++#if LIBAVCODEC_VERSION_CHECK( 59, 24, 100 ) + es_fmt.audio.i_channels = cp->ch_layout.nb_channels; + #else + es_fmt.audio.i_channels = cp->channels; +diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c +index 664a646734c0..a48190c93ca0 100644 +--- a/modules/demux/avformat/mux.c ++++ b/modules/demux/avformat/mux.c +@@ -273,7 +273,7 @@ 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 ++#if LIBAVCODEC_VERSION_CHECK( 59, 24, 100 ) + av_channel_layout_default( &codecpar->ch_layout, fmt->audio.i_channels ); + #else + codecpar->channels = fmt->audio.i_channels; +-- +GitLab + + +From 534564b289db7ee966abf888207258c3e6828c98 Mon Sep 17 00:00:00 2001 +From: Zhao Zhili +Date: Fri, 11 Jun 2021 18:02:34 +0800 +Subject: [PATCH 07/15] codec: avcodec: check open codec return value + +(cherry picked from commit 21ab6be22e7c1831cebf023fd53bd7ffbfad22f6) (edited) +edited: +- on 3.0 DecodeBlock returns a picture_t, not an error code +--- + modules/codec/avcodec/audio.c | 7 ++++++- + modules/codec/avcodec/video.c | 11 +++++++---- + 2 files changed, 13 insertions(+), 5 deletions(-) + +diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c +index a3f67f7bd934..e8436754f4a5 100644 +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -309,7 +309,12 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block ) + && !avcodec_is_open( ctx ) ) + { + InitDecoderConfig( p_dec, ctx ); +- OpenAudioCodec( p_dec ); ++ if( OpenAudioCodec( p_dec ) < 0 ) ++ { ++ if( pp_block != NULL && *pp_block != NULL ) ++ block_Release( *pp_block ); ++ return VLCDEC_ECRITICAL; ++ } + } + + if( !avcodec_is_open( ctx ) ) +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index c306e916c7d6..096a0b7940e2 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -1114,17 +1114,20 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error + bool eos_spotted = false; + + +- block_t *p_block; ++ block_t *p_block = pp_block ? *pp_block : NULL; + vlc_tick_t current_time; + + if( !p_context->extradata_size && p_dec->fmt_in.i_extra ) + { + ffmpeg_InitCodec( p_dec ); +- if( !avcodec_is_open( p_context ) ) +- OpenVideoCodec( p_dec ); ++ if( !avcodec_is_open( p_context ) && OpenVideoCodec(p_dec) < 0 ) ++ { ++ if( p_block != NULL ) ++ block_Release( p_block ); ++ return NULL; ++ } + } + +- p_block = pp_block ? *pp_block : NULL; + if(!p_block && !(p_sys->p_codec->capabilities & AV_CODEC_CAP_DELAY) ) + return NULL; + +-- +GitLab + + +From b2b54eb1efa3ecc72a4a64d0d962cab0676fbce1 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Fri, 6 Jan 2023 10:16:09 +0100 +Subject: [PATCH 08/15] avcodec: use ARRAY_SIZE instead of custom code + +(cherry picked from commit 28c80ee47e6cdf961f501eed9d4837956b38afd1) +--- + modules/codec/avcodec/audio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c +index e8436754f4a5..20744010433b 100644 +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -558,7 +558,7 @@ vlc_fourcc_t GetVlcAudioFormat( int fmt ) + [AV_SAMPLE_FMT_FLTP] = VLC_CODEC_FL32, + [AV_SAMPLE_FMT_DBLP] = VLC_CODEC_FL64, + }; +- if( (sizeof(fcc) / sizeof(fcc[0])) > (unsigned)fmt ) ++ if( ARRAY_SIZE(fcc) > (unsigned)fmt ) + return fcc[fmt]; + return VLC_CODEC_S16N; + } +-- +GitLab + + +From 763dc3eba52cb7633a84f44dcde19602fca5eac7 Mon Sep 17 00:00:00 2001 +From: Ilkka Ollakka +Date: Wed, 5 Jul 2023 15:09:57 +0300 +Subject: [PATCH 09/15] avcodec/audio: make channel mapping array 0 terminated + +Also change pi_channels_src to be only AOUT_CHAN_MAX instead of same +size as mapping array. + +(cherry picked from commit 0ff86bf8a28a080340f600cb8561815fc43e3b4a) (rebased) +rebased: +- the code around is slightly different +--- + modules/codec/avcodec/audio.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c +index 20744010433b..04c540173bf9 100644 +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -585,6 +585,7 @@ static const uint64_t pi_channels_map[][2] = + { AV_CH_TOP_BACK_RIGHT, 0 }, + { AV_CH_STEREO_LEFT, 0 }, + { AV_CH_STEREO_RIGHT, 0 }, ++ { 0, 0 }, + }; + + static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) +@@ -617,8 +618,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) + } + #endif + +- const unsigned i_order_max = sizeof(pi_channels_map)/sizeof(*pi_channels_map); +- uint32_t pi_order_src[i_order_max]; ++ uint32_t pi_order_src[AOUT_CHAN_MAX] = { 0 }; + + int i_channels_src = 0, channel_count; + uint64_t channel_layout_mask; +@@ -637,7 +637,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) + + if( channel_layout_mask ) + { +- for( unsigned i = 0; i < i_order_max ++ for( unsigned i = 0; pi_channels_map[i][0] + && i_channels_src < channel_count; i++ ) + { + if( channel_layout_mask & pi_channels_map[i][0] ) +-- +GitLab + + +From d1fb5c6cb372d2233046064db174daf1987c1211 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= +Date: Mon, 10 Jun 2024 11:10:37 +0700 +Subject: [PATCH 10/15] codec: avcodec: fix ch_layout requirement + +refs #28667 + +(cherry picked from commit 41778535dcae8b145ebfaa0392de281e470a91bf) (edited) +edited: +- on 3.0 the audio check was still using a LIBAVCODEC_VERSION_CHECK check +- the mux/demux checks were already there with different spaces +--- + modules/codec/avcodec/audio.c | 2 +- + modules/demux/avformat/demux.c | 2 +- + modules/demux/avformat/mux.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c +index 04c540173bf9..979256c400ad 100644 +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -142,7 +142,7 @@ static int OpenAudioCodec( decoder_t *p_dec ) + } + + ctx->sample_rate = p_dec->fmt_in.audio.i_rate; +-#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) ++#if LIBAVUTIL_VERSION_CHECK(57, 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; +diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c +index 9975b0f47b67..c49f7eb4fc0e 100644 +--- a/modules/demux/avformat/demux.c ++++ b/modules/demux/avformat/demux.c +@@ -400,7 +400,7 @@ 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_CHECK( 59, 24, 100 ) ++#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) + es_fmt.audio.i_channels = cp->ch_layout.nb_channels; + #else + es_fmt.audio.i_channels = cp->channels; +diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c +index a48190c93ca0..090ed9f5bfa8 100644 +--- a/modules/demux/avformat/mux.c ++++ b/modules/demux/avformat/mux.c +@@ -273,7 +273,7 @@ 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_CHECK( 59, 24, 100 ) ++#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) + av_channel_layout_default( &codecpar->ch_layout, fmt->audio.i_channels ); + #else + codecpar->channels = fmt->audio.i_channels; +-- +GitLab + + +From 0bcb306b7c05549a795b901ae33d6c7204456716 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Tue, 18 Jun 2024 15:34:10 +0200 +Subject: [PATCH 11/15] ffmpeg: fix libavutil version check for + av_channel_layout_default() + +It was added in c41899a3770cb4510e15b223fa34d129305b1589 which +was libavutil 57.23.100 at the time but the minor version was not updated in +that commit so we check 57.24.100. + +The same check applies for av_channel_layout_copy() added in the same commit. + +This is part of FFmpeg 5.1. + +https://github.com/FFmpeg/FFmpeg/commit/086a8048061bf9fb4c63943f6962db48175f655c +(cherry picked from commit 195f0c98599b55950c49a62f98d9d3495be310df) (rebased) +rebased: +- the code around is slightly different +--- + modules/codec/avcodec/encoder.c | 8 ++++---- + modules/demux/avformat/mux.c | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c +index 2014b8afaf52..ec63c9c54397 100644 +--- a/modules/codec/avcodec/encoder.c ++++ b/modules/codec/avcodec/encoder.c +@@ -764,7 +764,7 @@ int InitVideoEnc( vlc_object_t *p_this ) + uint32_t order_mask = 0; + int i_channels_src = 0; + msg_Dbg( p_enc, "Creating channel order for reordering"); +-# if LIBAVCODEC_VERSION_CHECK(59, 24, 100) ++# if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 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 +@@ -917,7 +917,7 @@ errmsg: + + if( p_enc->fmt_out.audio.i_channels > 2 ) + { +-#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) ++#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100) + av_channel_layout_default( &p_context->ch_layout, 2 ); + #else + p_context->channels = 2; +@@ -1281,7 +1281,7 @@ 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, 24, 100) ++#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 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; +@@ -1416,7 +1416,7 @@ 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, 24, 100) ++#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 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; +diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c +index 090ed9f5bfa8..bf65ca36716f 100644 +--- a/modules/demux/avformat/mux.c ++++ b/modules/demux/avformat/mux.c +@@ -273,7 +273,7 @@ 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_CHECK(59, 24, 100) ++#if LIBAVUTIL_VERSION_CHECK(57, 24, 100) + av_channel_layout_default( &codecpar->ch_layout, fmt->audio.i_channels ); + #else + codecpar->channels = fmt->audio.i_channels; +-- +GitLab + + +From 38f9638ec71c2fe917dfd99ac2e1795b3357cfc3 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Tue, 18 Jun 2024 16:04:41 +0200 +Subject: [PATCH 12/15] ffmpeg: fix libavcodec version check for + AVCodecParameters.ch_layout +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It was added in 276c06726fbd2f784d51189870bd834e9284812f which +was libavcodec 59.23.100 at the time but the minor version was not updated in +that commit so we check 59.24.100. + +This is part of FFmpeg 5.1. + +It was erroneously removed in a55ec32ab3760d9edb6f05481cd3a981aa42878d. + +https://github.com/FFmpeg/FFmpeg/commit/276c06726fbd2f784d51189870bd834e9284812f + +Co-authored-by: François Cartegnie +(cherry picked from commit 597bdb8e0784101b5f412feba3309558ad5b8862) +--- + modules/demux/avformat/mux.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c +index bf65ca36716f..d8be5d1d9f53 100644 +--- a/modules/demux/avformat/mux.c ++++ b/modules/demux/avformat/mux.c +@@ -273,7 +273,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input ) + { + case AUDIO_ES: + codecpar->codec_type = AVMEDIA_TYPE_AUDIO; +-#if LIBAVUTIL_VERSION_CHECK(57, 24, 100) ++#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100) + av_channel_layout_default( &codecpar->ch_layout, fmt->audio.i_channels ); + #else + codecpar->channels = fmt->audio.i_channels; +-- +GitLab + + +From 0939d55b81e916ff303f92f301257c2e0885fdb9 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Wed, 19 Jun 2024 13:41:04 +0200 +Subject: [PATCH 13/15] avcodec: fix libavcodec version check for + AVCodecContext.ch_layout +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It was added in 548aeb93834b8425c86d1ce60fddc1d41805724d which +was libavcodec 59.23.100 at the time but the minor version was not updated in +that commit so we check 59.24.100. + +This is part of FFmpeg 5.1. + +https://github.com/FFmpeg/FFmpeg/commit/548aeb93834b8425c86d1ce60fddc1d41805724d + +Co-authored-by: François Cartegnie +(cherry picked from commit 8fd918b8787b8d077decf1a2b955ab0c7b964bf3) (rebased) +rebased: +- on 3.0 fmt_in is not a pointer +--- + modules/codec/avcodec/audio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c +index 979256c400ad..fb22f0330053 100644 +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -142,7 +142,7 @@ static int OpenAudioCodec( decoder_t *p_dec ) + } + + ctx->sample_rate = p_dec->fmt_in.audio.i_rate; +-#if LIBAVUTIL_VERSION_CHECK(57, 24, 100) ++#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 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; +-- +GitLab + + +From e5072b340425e786b9e376cdf4bff4962c6e32f2 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Wed, 19 Jun 2024 08:36:40 +0200 +Subject: [PATCH 14/15] ffmpeg: fix libavutil version check for + AVFrame.ch_layout + +It was added in db6efa1815e217ed76f39aee8b15ee5c64698537 which +was libavutil 57.23.100 at the time but the minor version was not updated in +that commit so we check 57.24.100. + +This is part of FFmpeg 5.1. + +https://github.com/FFmpeg/FFmpeg/commit/db6efa1815e217ed76f39aee8b15ee5c64698537 +(cherry picked from commit f237155887f049f8befef2fdfadae7b60f697b0d) +--- + modules/codec/avcodec/audio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c +index fb22f0330053..c27771aeb2e6 100644 +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -407,7 +407,7 @@ 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, 24, 100) ++#if LIBAVUTIL_VERSION_CHECK(57, 24, 100) + int channels = frame->ch_layout.nb_channels; + #else + int channels = ctx->channels; +-- +GitLab + + +From 1713be552f9e26260a3ac33ce04ab89f660780cc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= +Date: Thu, 20 Jun 2024 13:12:37 +0200 +Subject: [PATCH 15/15] avcodec: add a define to test for + AVCodecContext.ch_layout availability + +Co-authored-by: Steve Lhomme +(cherry picked from commit 3abf93735df97cc2c96e11028b76067547c27eb7) (rebased) +rebased: +- on 3.0 the fmt_in is not a pointer +- the code around is slightly different due to the use of API_CHANNEL_LAYOUT +--- + modules/codec/avcodec/audio.c | 8 +++++--- + modules/codec/avcodec/encoder.c | 12 +++++++----- + 2 files changed, 12 insertions(+), 8 deletions(-) + +diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c +index c27771aeb2e6..b6186d6ec56d 100644 +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -41,6 +41,8 @@ + #include + #include + ++#define API_CHANNEL_LAYOUT_STRUCT (LIBAVCODEC_VERSION_CHECK(59, 24, 100)) // AVCodecContext.ch_layout ++ + #define API_CHANNEL_LAYOUT (LIBAV_UTIL_VERSION_CHECK( 52, 2, 6, 0, 100)) + + #if API_CHANNEL_LAYOUT +@@ -142,7 +144,7 @@ static int OpenAudioCodec( decoder_t *p_dec ) + } + + ctx->sample_rate = p_dec->fmt_in.audio.i_rate; +-#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100) ++#if API_CHANNEL_LAYOUT_STRUCT && LIBAVUTIL_VERSION_CHECK(57, 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; +@@ -598,7 +600,7 @@ 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, 24, 100) ++#if API_CHANNEL_LAYOUT_STRUCT + 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; +@@ -622,7 +624,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) + + int i_channels_src = 0, channel_count; + uint64_t channel_layout_mask; +-#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) ++#if API_CHANNEL_LAYOUT_STRUCT + 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 +diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c +index ec63c9c54397..b0d31269244c 100644 +--- a/modules/codec/avcodec/encoder.c ++++ b/modules/codec/avcodec/encoder.c +@@ -47,6 +47,8 @@ + #include "avcodec.h" + #include "avcommon.h" + ++#define API_CHANNEL_LAYOUT_STRUCT (LIBAVCODEC_VERSION_CHECK(59, 24, 100)) // AVCodecContext.ch_layout ++ + #define API_CHANNEL_LAYOUT (LIBAV_UTIL_VERSION_CHECK( 52, 2, 6, 0, 100)) + + #if API_CHANNEL_LAYOUT +@@ -182,7 +184,7 @@ static const uint64_t pi_channels_map[][2] = + { AV_CH_STEREO_RIGHT, 0 }, + }; + +-# if !LIBAVCODEC_VERSION_CHECK(59, 24, 100) ++# if !API_CHANNEL_LAYOUT_STRUCT + static const uint32_t channel_mask[][2] = { + {0,0}, + {AOUT_CHAN_CENTER, AV_CH_LAYOUT_MONO}, +@@ -764,7 +766,7 @@ int InitVideoEnc( vlc_object_t *p_this ) + uint32_t order_mask = 0; + int i_channels_src = 0; + msg_Dbg( p_enc, "Creating channel order for reordering"); +-# if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100) ++# if API_CHANNEL_LAYOUT_STRUCT && LIBAVUTIL_VERSION_CHECK(57, 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 +@@ -917,7 +919,7 @@ errmsg: + + if( p_enc->fmt_out.audio.i_channels > 2 ) + { +-#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100) ++#if API_CHANNEL_LAYOUT_STRUCT && LIBAVUTIL_VERSION_CHECK(57, 24, 100) + av_channel_layout_default( &p_context->ch_layout, 2 ); + #else + p_context->channels = 2; +@@ -1281,7 +1283,7 @@ 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, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100) ++#if API_CHANNEL_LAYOUT_STRUCT && LIBAVUTIL_VERSION_CHECK(57, 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; +@@ -1416,7 +1418,7 @@ 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, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100) ++#if API_CHANNEL_LAYOUT_STRUCT && LIBAVUTIL_VERSION_CHECK(57, 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; +-- +GitLab + diff --git a/6527.patch b/6527.patch new file mode 100644 index 0000000..f483dc9 --- /dev/null +++ b/6527.patch @@ -0,0 +1,46 @@ +From a945944c2d50cacfacdd5b16d4ea5e7b4766a9fc Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +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 +Co-authored-by: Thomas Guillem +--- + 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 + diff --git a/6606.patch b/6606.patch new file mode 100644 index 0000000..b1cf6ed --- /dev/null +++ b/6606.patch @@ -0,0 +1,149 @@ +From ba5dc03aecc1d96f81b76838f845ebde7348cf62 Mon Sep 17 00:00:00 2001 +From: David Rosca +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 + #endif + #include ++#if FF_API_STRUCT_VAAPI_CONTEXT + #include ++#else ++#include ++#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 + diff --git a/vlc.changes b/vlc.changes index f7fcbf4..6f91965 100644 --- a/vlc.changes +++ b/vlc.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Aug 20 12:54:30 UTC 2025 - Bjørn Lie + +- Port to current ffmpeg-7: Remove version constraints on ffmpeg + BuildRequires, add upstream patches and pass disable-vdpau to + configure, this disables build/shipping of vdpau subpackage. + Patches added: 5574.patch, 6168.patch, 6273.patch, 6606.patch and + 6527.patch. +- Add missing vlc Requires to devel sub-package, previously pulled + in via vlc-vdpau package. + ------------------------------------------------------------------- Thu Aug 7 09:27:34 UTC 2025 - Bjørn Lie diff --git a/vlc.spec b/vlc.spec index 2b1aae9..e2ef1ad 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,7 +1,7 @@ # # spec file for package vlc # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # Copyright (c) 2012 Dominique Leuenberger, Amsterdam, The Netherlands # # All modifications and additions to the file contributed by third parties @@ -62,6 +62,18 @@ Patch7: https://code.videolan.org/videolan/vlc/-/merge_requests/5590.pat Patch100: vlc-projectM-qt5.patch # PATCH-FIX-UPSTREAM -- Use OpenCV C++ API Patch103: 0001-Port-OpenCV-facedetect-example-to-C-API.patch + +# PATCH-FIX-UPSTREAM -- add support for ffmpeg 7.0 (without VAAPI) +Patch111: https://code.videolan.org/videolan/vlc/-/merge_requests/5574.patch +# PATCH-FIX-UPSTREAM -- mux: avformat: fix avio callbacks signature with ffmpeg 6.1 +Patch112: https://code.videolan.org/videolan/vlc/-/merge_requests/6168.patch +# PATCH-FIX-UPSTREAM -- ffmpeg: backport more channel checks +Patch113: https://code.videolan.org/videolan/vlc/-/merge_requests/6273.patch +# PATCH-FIX-UPSTREAM -- avcodec: vaapi: support VAAPI with latest FFmpeg +Patch114: https://code.videolan.org/videolan/vlc/-/merge_requests/6606.patch +# PATCH-FIX-UPSTREAM -- nfs: fix libnfs API v2 support +Patch115: https://code.videolan.org/videolan/vlc/-/merge_requests/6527.patch + BuildRequires: Mesa-devel BuildRequires: aalib-devel BuildRequires: alsa-devel >= 1.0.24 @@ -121,9 +133,6 @@ BuildRequires: pkgconfig(libplacebo) < 6.292.0 BuildRequires: speex-devel >= 1.0.5 BuildRequires: update-desktop-files BuildRequires: vcdimager-devel -BuildRequires: (pkgconfig(libavcodec) >= 57.37.100 with pkgconfig(libavcodec) < 60) -BuildRequires: (pkgconfig(libavformat) >= 53.21.0 with pkgconfig(libavformat) < 60) -BuildRequires: (pkgconfig(libavutil) >= 52.4.0 with pkgconfig(libavutil) < 58) BuildRequires: pkgconfig(Qt5Core) >= 5.5.0 BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Svg) @@ -137,6 +146,9 @@ BuildRequires: pkgconfig(fdk-aac) BuildRequires: pkgconfig(gnutls) >= 3.2.0 BuildRequires: pkgconfig(libarchive) >= 3.1.0 BuildRequires: pkgconfig(libass) >= 0.9.8 +BuildRequires: pkgconfig(libavcodec) +BuildRequires: pkgconfig(libavformat) +BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libbluray) >= 0.6.2 %if %dca BuildRequires: pkgconfig(libdca) >= 0.0.5 @@ -148,11 +160,11 @@ BuildRequires: pkgconfig(libmtp) >= 1.0.0 %if 0%{?suse_version} >= 1500 BuildRequires: pkgconfig(libnfs) %endif -BuildRequires: (pkgconfig(libpostproc) with pkgconfig(libpostproc) < 56) -BuildRequires: (pkgconfig(libswscale) with pkgconfig(libswscale) < 6) BuildRequires: pkgconfig(libnotify) +BuildRequires: pkgconfig(libpostproc) BuildRequires: pkgconfig(libpulse) >= 1.0 BuildRequires: pkgconfig(libsecret-1) >= 0.18 +BuildRequires: pkgconfig(libswscale) BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(libva) BuildRequires: pkgconfig(libva-x11) @@ -163,7 +175,7 @@ BuildRequires: pkgconfig(soxr) BuildRequires: pkgconfig(speexdsp) BuildRequires: pkgconfig(taglib) >= 1.9 BuildRequires: pkgconfig(twolame) -BuildRequires: pkgconfig(vdpau) >= 0.6 +%dnl BuildRequires: pkgconfig(vdpau) >= 0.6 BuildRequires: pkgconfig(xcb) >= 1.6 BuildRequires: pkgconfig(xcb-composite) BuildRequires: pkgconfig(xcb-keysyms) >= 0.3.4 @@ -256,9 +268,10 @@ libraries, which may not have all codecs enabled that were just named. %package devel Summary: Development files for the VLC media player system Group: Development/Libraries/C and C++ +Requires: %{name} = %{version} Requires: %{name}-jack = %{version} Requires: %{name}-noX = %{version} -Requires: %{name}-vdpau = %{version} +%dnl Requires: %{name}-vdpau = %{version} %description devel These development headers are required if you plan on coding against VLC. @@ -403,6 +416,12 @@ default when `vlc` is invoked from an X session. %endif %patch -P 103 -p1 +%patch -P 111 -p1 +%patch -P 112 -p1 +%patch -P 113 -p1 +%patch -P 114 -p1 +%patch -P 115 -p1 + # a52_init() < 0.8.0 doesn't take any arguments if pkg-config --max-version 0.8 liba52; then %patch -P 0 -p1 @@ -481,7 +500,7 @@ autoreconf -fiv --enable-twolame \ --enable-v4l2 \ --enable-vcd \ - --enable-vdpau \ + --disable-vdpau \ --enable-vorbis \ --enable-xcb \ --enable-xvideo \ @@ -1191,17 +1210,17 @@ fi %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so %endif -%files vdpau -%dir %{_libdir}/vlc/plugins/vdpau -%{_libdir}/vlc/libvlc_vdpau.so.0 -%{_libdir}/vlc/libvlc_vdpau.so.0.0.0 -%{_libdir}/vlc/plugins/vdpau/libvdpau_adjust_plugin.so -%{_libdir}/vlc/plugins/vdpau/libvdpau_avcodec_plugin.so -%{_libdir}/vlc/plugins/vdpau/libvdpau_chroma_plugin.so -%{_libdir}/vlc/plugins/vdpau/libvdpau_deinterlace_plugin.so -%{_libdir}/vlc/plugins/vdpau/libvdpau_display_plugin.so -%{_libdir}/vlc/plugins/vdpau/libvdpau_sharpen_plugin.so -%{_libdir}/vlc/plugins/video_output/libglconv_vdpau_plugin.so +%dnl files vdpau +%dnl dir %{_libdir}/vlc/plugins/vdpau +%dnl {_libdir}/vlc/libvlc_vdpau.so.0 +%dnl {_libdir}/vlc/libvlc_vdpau.so.0.0.0 +%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_adjust_plugin.so +%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_avcodec_plugin.so +%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_chroma_plugin.so +%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_deinterlace_plugin.so +%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_display_plugin.so +%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_sharpen_plugin.so +%dnl {_libdir}/vlc/plugins/video_output/libglconv_vdpau_plugin.so %files -n libvlc%{libvlc} %{_libdir}/libvlc.so.%{libvlc}* @@ -1221,7 +1240,7 @@ fi %{_libdir}/pkgconfig/libvlc.pc %{_libdir}/pkgconfig/vlc-plugin.pc %{_libdir}/vlc/libcompat.a -%{_libdir}/vlc/libvlc_vdpau.so +%dnl {_libdir}/vlc/libvlc_vdpau.so %if 0%{?BUILD_ORIG} %files codecs -- 2.51.1 From 5a33ecb827d600dfddd0dc67d5c2b674fab30159a9c0bbf42bf323f457edc40b Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 8 Oct 2025 16:12:12 +0000 Subject: [PATCH 3/7] Accepting request 1309761 from multimedia:libs - Pin to ffmpeg-7; even the master branch does not yet build against ffmpeg 8. - Drop vcdimager-devel BuildRequires: Not needed nor used, vcd plugin is still built without it. OBS-URL: https://build.opensuse.org/request/show/1309761 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vlc?expand=0&rev=157 --- vlc.changes | 12 ++++++++++++ vlc.spec | 35 +++++++++++++++++------------------ 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/vlc.changes b/vlc.changes index 6f91965..2c1c959 100644 --- a/vlc.changes +++ b/vlc.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Oct 7 07:16:18 UTC 2025 - Dominique Leuenberger + +- Pin to ffmpeg-7; even the master branch does not yet build + against ffmpeg 8. + +------------------------------------------------------------------- +Thu Oct 2 11:03:15 UTC 2025 - Bjørn Lie + +- Drop vcdimager-devel BuildRequires: Not needed nor used, vcd + plugin is still built without it. + ------------------------------------------------------------------- Wed Aug 20 12:54:30 UTC 2025 - Bjørn Lie diff --git a/vlc.spec b/vlc.spec index e2ef1ad..0a92a02 100644 --- a/vlc.spec +++ b/vlc.spec @@ -132,7 +132,6 @@ BuildRequires: pkgconfig(libplacebo) < 6.292.0 #BuildRequires: slang-devel BuildRequires: speex-devel >= 1.0.5 BuildRequires: update-desktop-files -BuildRequires: vcdimager-devel BuildRequires: pkgconfig(Qt5Core) >= 5.5.0 BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Svg) @@ -146,9 +145,9 @@ BuildRequires: pkgconfig(fdk-aac) BuildRequires: pkgconfig(gnutls) >= 3.2.0 BuildRequires: pkgconfig(libarchive) >= 3.1.0 BuildRequires: pkgconfig(libass) >= 0.9.8 -BuildRequires: pkgconfig(libavcodec) -BuildRequires: pkgconfig(libavformat) -BuildRequires: pkgconfig(libavutil) +BuildRequires: pkgconfig(libavcodec) < 62 +BuildRequires: pkgconfig(libavformat) < 62 +BuildRequires: pkgconfig(libavutil) < 60 BuildRequires: pkgconfig(libbluray) >= 0.6.2 %if %dca BuildRequires: pkgconfig(libdca) >= 0.0.5 @@ -175,7 +174,7 @@ BuildRequires: pkgconfig(soxr) BuildRequires: pkgconfig(speexdsp) BuildRequires: pkgconfig(taglib) >= 1.9 BuildRequires: pkgconfig(twolame) -%dnl BuildRequires: pkgconfig(vdpau) >= 0.6 +# %dnl BuildRequires: pkgconfig(vdpau) >= 0.6 BuildRequires: pkgconfig(xcb) >= 1.6 BuildRequires: pkgconfig(xcb-composite) BuildRequires: pkgconfig(xcb-keysyms) >= 0.3.4 @@ -271,7 +270,7 @@ Group: Development/Libraries/C and C++ Requires: %{name} = %{version} Requires: %{name}-jack = %{version} Requires: %{name}-noX = %{version} -%dnl Requires: %{name}-vdpau = %{version} +# %dnl Requires: %{name}-vdpau = %{version} %description devel These development headers are required if you plan on coding against VLC. @@ -1210,17 +1209,17 @@ fi %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so %endif -%dnl files vdpau -%dnl dir %{_libdir}/vlc/plugins/vdpau -%dnl {_libdir}/vlc/libvlc_vdpau.so.0 -%dnl {_libdir}/vlc/libvlc_vdpau.so.0.0.0 -%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_adjust_plugin.so -%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_avcodec_plugin.so -%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_chroma_plugin.so -%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_deinterlace_plugin.so -%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_display_plugin.so -%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_sharpen_plugin.so -%dnl {_libdir}/vlc/plugins/video_output/libglconv_vdpau_plugin.so +# %dnl files vdpau +# %dnl dir %{_libdir}/vlc/plugins/vdpau +# %dnl {_libdir}/vlc/libvlc_vdpau.so.0 +# %dnl {_libdir}/vlc/libvlc_vdpau.so.0.0.0 +# %dnl {_libdir}/vlc/plugins/vdpau/libvdpau_adjust_plugin.so +# %dnl {_libdir}/vlc/plugins/vdpau/libvdpau_avcodec_plugin.so +# %dnl {_libdir}/vlc/plugins/vdpau/libvdpau_chroma_plugin.so +# %dnl {_libdir}/vlc/plugins/vdpau/libvdpau_deinterlace_plugin.so +# %dnl {_libdir}/vlc/plugins/vdpau/libvdpau_display_plugin.so +# %dnl {_libdir}/vlc/plugins/vdpau/libvdpau_sharpen_plugin.so +# %dnl {_libdir}/vlc/plugins/video_output/libglconv_vdpau_plugin.so %files -n libvlc%{libvlc} %{_libdir}/libvlc.so.%{libvlc}* @@ -1240,7 +1239,7 @@ fi %{_libdir}/pkgconfig/libvlc.pc %{_libdir}/pkgconfig/vlc-plugin.pc %{_libdir}/vlc/libcompat.a -%dnl {_libdir}/vlc/libvlc_vdpau.so +# %dnl {_libdir}/vlc/libvlc_vdpau.so %if 0%{?BUILD_ORIG} %files codecs -- 2.51.1 From 65e25898c190072e75f1f8e8cdd7479aa3cecd7898760b04581b4490e5f2fd3e Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 10 Oct 2025 15:08:08 +0000 Subject: [PATCH 4/7] Accepting request 1309917 from multimedia:libs OBS-URL: https://build.opensuse.org/request/show/1309917 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vlc?expand=0&rev=158 --- vlc.a52.patch | 13 ------------- vlc.changes | 8 ++++++++ vlc.spec | 26 ++------------------------ 3 files changed, 10 insertions(+), 37 deletions(-) delete mode 100644 vlc.a52.patch diff --git a/vlc.a52.patch b/vlc.a52.patch deleted file mode 100644 index 1767eef..0000000 --- a/vlc.a52.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: vlc-3.0.0/modules/codec/a52.c -=================================================================== ---- vlc-3.0.0.orig/modules/codec/a52.c -+++ vlc-3.0.0/modules/codec/a52.c -@@ -302,7 +302,7 @@ static int Open( vlc_object_t *p_this ) - p_sys->i_flags |= A52_ADJUST_LEVEL; - - /* Initialize liba52 */ -- p_sys->p_liba52 = a52_init( 0 ); -+ p_sys->p_liba52 = a52_init (); - if( p_sys->p_liba52 == NULL ) - { - msg_Err( p_this, "unable to initialize liba52" ); diff --git a/vlc.changes b/vlc.changes index 2c1c959..e6f7f37 100644 --- a/vlc.changes +++ b/vlc.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Oct 7 09:55:31 UTC 2025 - Bjørn Lie + +- Drop liba52-devel, pkgconfig(libdca) and pkgconfig(libmpeg2) + BuildRequires and vlc.a52.patch and dca conditional define, next + stable vlc will disable these by default and rely on ffmpeg for + decoding instead. We might as well get ahead of this now. + ------------------------------------------------------------------- Tue Oct 7 07:16:18 UTC 2025 - Dominique Leuenberger diff --git a/vlc.spec b/vlc.spec index 0a92a02..9c5bb89 100644 --- a/vlc.spec +++ b/vlc.spec @@ -31,7 +31,6 @@ %bcond_with vnc %bcond_without faad %define chromecast 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150600 -%define dca 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150600 || 0%{?BUILD_ORIG} Name: vlc Version: 3.0.21 @@ -44,8 +43,6 @@ Source: http://download.videolan.org/%{name}/%{version}/%{name}-%{versio Source2: %{name}-rpmlintrc Source98: http://download.videolan.org/%{name}/%{version}/%{name}-%{version}.tar.xz.asc Source99: vlc.keyring -# PATCH-FIX-UPSTREAM vlc.a52.patch https://trac.videolan.org/vlc/ticket/3731 dimstar@opensuse.org -- Support new version of liba52 -Patch0: vlc.a52.patch # PATCH-FIX-UPSTREAM vlc-allow-deprecated-fribidi.patch dimstar@opensuse.org -- Allow usage of deprecated fribidi functions Patch1: vlc-allow-deprecated-fribidi.patch # PATCH-FIX-UPSTREAM vlc-lua-5.3.patch dimstar@opensuse.org -- Replace lua_optlong with lua_optinteger @@ -89,7 +86,6 @@ BuildRequires: gettext-devel #BuildRequires: git BuildRequires: gtk3-devel BuildRequires: libQt5Gui-private-headers-devel -BuildRequires: liba52-devel BuildRequires: libavc1394-devel >= 0.5.3 BuildRequires: libcddb-devel >= 0.9.5 BuildRequires: libcdio-devel >= 0.78.2 @@ -149,12 +145,8 @@ BuildRequires: pkgconfig(libavcodec) < 62 BuildRequires: pkgconfig(libavformat) < 62 BuildRequires: pkgconfig(libavutil) < 60 BuildRequires: pkgconfig(libbluray) >= 0.6.2 -%if %dca -BuildRequires: pkgconfig(libdca) >= 0.0.5 -%endif BuildRequires: pkgconfig(libgme) #BuildRequires: pkgconfig(libmodplug) >= 0.8.9 -BuildRequires: pkgconfig(libmpeg2) > 0.3.2 BuildRequires: pkgconfig(libmtp) >= 1.0.0 %if 0%{?suse_version} >= 1500 BuildRequires: pkgconfig(libnfs) @@ -421,11 +413,6 @@ default when `vlc` is invoked from an X session. %patch -P 114 -p1 %patch -P 115 -p1 -# a52_init() < 0.8.0 doesn't take any arguments -if pkg-config --max-version 0.8 liba52; then -%patch -P 0 -p1 -fi - ### And LUA 5.3.1 has some more API changes if pkg-config --atleast-version 5.3.1 lua; then %patch -P 2 -p1 @@ -449,7 +436,7 @@ autoreconf -fiv --disable-dependency-tracking \ --disable-oss \ --disable-svgdec \ - --enable-a52 \ + --disable-a52 \ --enable-aa \ --enable-alsa \ --enable-avcodec \ @@ -458,11 +445,7 @@ autoreconf -fiv %else --disable-chromecast \ %endif -%if %dca - --enable-dca \ -%else --disable-dca \ -%endif --enable-dvbpsi \ --enable-dvdnav \ --enable-dvdread \ @@ -476,7 +459,7 @@ autoreconf -fiv --enable-kate \ --enable-libass \ --enable-libcddb \ - --enable-libmpeg2 \ + --disable-libmpeg2 \ %if 0%{?is_opensuse} --enable-libplacebo \ %endif @@ -897,7 +880,6 @@ fi %{_libdir}/vlc/plugins/audio_output/libafile_plugin.so %{_libdir}/vlc/plugins/audio_output/libalsa_plugin.so %{_libdir}/vlc/plugins/audio_output/libamem_plugin.so -%{_libdir}/vlc/plugins/codec/liba52_plugin.so %{_libdir}/vlc/plugins/codec/libadpcm_plugin.so %{_libdir}/vlc/plugins/codec/libaes3_plugin.so %{_libdir}/vlc/plugins/codec/libaom_plugin.so @@ -908,9 +890,6 @@ fi %if 0%{?suse_version} >= 1550 %{_libdir}/vlc/plugins/codec/libdav1d_plugin.so %endif -%if %dca -%{_libdir}/vlc/plugins/codec/libdca_plugin.so -%endif %{_libdir}/vlc/plugins/codec/libddummy_plugin.so %{_libdir}/vlc/plugins/codec/libdvbsub_plugin.so %{_libdir}/vlc/plugins/codec/libedummy_plugin.so @@ -922,7 +901,6 @@ fi %{_libdir}/vlc/plugins/codec/libg711_plugin.so %{_libdir}/vlc/plugins/codec/libjpeg_plugin.so %{_libdir}/vlc/plugins/codec/libkate_plugin.so -%{_libdir}/vlc/plugins/codec/liblibmpeg2_plugin.so %{_libdir}/vlc/plugins/codec/liblpcm_plugin.so %{_libdir}/vlc/plugins/codec/libmpg123_plugin.so %{_libdir}/vlc/plugins/codec/liboggspots_plugin.so -- 2.51.1 From 8367a42d4cad217c5e40cf79224ac8f946c7005192eadd2bd4754b0ad5b330b5 Mon Sep 17 00:00:00 2001 From: Ana Guerrero Date: Wed, 31 Dec 2025 09:46:37 +0000 Subject: [PATCH 5/7] Accepting request 1324814 from multimedia:libs - Update to version 3.0.22: + Core: Assume subpictures are in SDR by default + Decoders: * Fix Opus channel mapping * Fix hardware decoding with VideoToolbox of XVID MPEG-4 video * Add dav1d-all-layers option * Fix DVD CEA-608 captions parsing * Fix ProRes 4:4:4:4 * Disable decoding using libdca, libmpeg2 and liba52 by default in favor of libavcodec + Demuxers: * Add support for DMX audio music (MUS) files * Handle mkv-use-chapter-codec option * Add A_ATRAC/AT1 support in matroska * Prevent FLAC seeking logic get stuck * Handle pictures in FLAC * Fix VOB/AOB LPCM/MLP detection failing occasionally * Cut QNap title on first invalid character * Fix display of certain JPEG files * Fix playback of very short ASF files (duration less than 1s) * Multiple fixes in MPEG-TS * Fix crashes in multiple demuxers (reported by rub.de, oss-fuzz and others) + Input: Fix SFTP seeking for large files on 32-bit OS + Interface: * Qt: Add option to use dark palette * Qt: Add compilation support for newer versions of Qt5 * Qt: Fix scrolling on volume slider * KDE: fix MPRIS state when started from file + Service Discovery: UPnP: remove SAT>IP channel list fallback + Video Output: * Use a better stretch mode in wingdi OBS-URL: https://build.opensuse.org/request/show/1324814 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vlc?expand=0&rev=159 --- 5574.patch | 775 ---------------------- 5590.patch | 28 - 6168.patch | 82 --- 6273.patch | 1430 ----------------------------------------- 6527.patch | 46 -- 6606.patch | 149 ----- vlc-3.0.21.tar.xz | 3 - vlc-3.0.21.tar.xz.asc | 6 - vlc-3.0.22.tar.xz | 3 + vlc-3.0.22.tar.xz.asc | 6 + vlc-taglib-2.0.patch | 171 ----- vlc.changes | 46 ++ vlc.keyring | 271 +++++++- vlc.spec | 28 +- 14 files changed, 313 insertions(+), 2731 deletions(-) delete mode 100644 5574.patch delete mode 100644 5590.patch delete mode 100644 6168.patch delete mode 100644 6273.patch delete mode 100644 6527.patch delete mode 100644 6606.patch delete mode 100644 vlc-3.0.21.tar.xz delete mode 100644 vlc-3.0.21.tar.xz.asc create mode 100644 vlc-3.0.22.tar.xz create mode 100644 vlc-3.0.22.tar.xz.asc delete mode 100644 vlc-taglib-2.0.patch diff --git a/5574.patch b/5574.patch deleted file mode 100644 index c1e92af..0000000 --- a/5574.patch +++ /dev/null @@ -1,775 +0,0 @@ -From 81d6d56df6e5a66ed99970e2c559539858f4a0b7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= -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 50a76c7a18e1..e5af0ca5f2f8 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 -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 e5af0ca5f2f8..26166c084e51 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 -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 26166c084e51..ad8a40ab4ed6 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 -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 4919ccf0e0e4..52848de06587 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?= -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 33c6cae09abc..97f3188211d3 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?= -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 52848de06587..6bd58f5071d2 100644 ---- a/modules/codec/avcodec/encoder.c -+++ b/modules/codec/avcodec/encoder.c -@@ -43,12 +43,13 @@ - #include - - #include --#include - - #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 - #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?= -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 ad8a40ab4ed6..c74757c76ae5 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -41,8 +41,11 @@ - #include - #include - --#include -+#define API_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 100)) - -+#if API_CHANNEL_LAYOUT -+# include -+#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?= -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 3b355bb3faec..830dc0157e2b 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 c708276954ce..8bf8735885f5 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 -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 6bd58f5071d2..757f93b46845 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 -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 757f93b46845..ae746c99fc89 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?= -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 e1560a9312cc..5260628364f0 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 2e6809a05410..037ad7d44887 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 - diff --git a/5590.patch b/5590.patch deleted file mode 100644 index 176d9d1..0000000 --- a/5590.patch +++ /dev/null @@ -1,28 +0,0 @@ -From a761e1c202b632e7865d18fcf11a2b9e285ea9ae Mon Sep 17 00:00:00 2001 -From: Tristan Matthews -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 - diff --git a/6168.patch b/6168.patch deleted file mode 100644 index 201504f..0000000 --- a/6168.patch +++ /dev/null @@ -1,82 +0,0 @@ -From a618e31cf209168ae420e95750734a37359969e1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= -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 - diff --git a/6273.patch b/6273.patch deleted file mode 100644 index ebda997..0000000 --- a/6273.patch +++ /dev/null @@ -1,1430 +0,0 @@ -From 8fef83731a6b7324ffd03933272fcfd9b08a2cb0 Mon Sep 17 00:00:00 2001 -From: Steve Lhomme -Date: Thu, 7 Nov 2024 07:20:57 +0100 -Subject: [PATCH 01/15] avcommon: rename LIBAVUTIL_VERSION_CHECK to - LIBAV_UTIL_VERSION_CHECK - -The LIBAVUTIL_VERSION_CHECK form will be for checks also done in 4.0. - -No functional changes. ---- - modules/codec/avcodec/audio.c | 2 +- - modules/codec/avcodec/avcommon_compat.h | 6 +++--- - modules/codec/avcodec/chroma.c | 2 +- - modules/codec/avcodec/encoder.c | 2 +- - modules/codec/avcodec/va.c | 2 +- - modules/codec/avcodec/video.c | 6 +++--- - 6 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c -index c74757c76ae5..44335ec3cced 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -41,7 +41,7 @@ - #include - #include - --#define API_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 100)) -+#define API_CHANNEL_LAYOUT (LIBAV_UTIL_VERSION_CHECK( 52, 2, 6, 0, 100)) - - #if API_CHANNEL_LAYOUT - # include -diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h -index 561ad83f99f9..bb2b9ae03e54 100644 ---- a/modules/codec/avcodec/avcommon_compat.h -+++ b/modules/codec/avcodec/avcommon_compat.h -@@ -86,15 +86,15 @@ - #ifdef HAVE_LIBAVUTIL_AVUTIL_H - # include - --/* LIBAVUTIL_VERSION_CHECK checks for the right version of libav and FFmpeg -+/* LIBAV_UTIL_VERSION_CHECK checks for the right version of libav and FFmpeg - * a is the major version - * b and c the minor and micro versions of libav - * d and e the minor and micro versions of FFmpeg */ --#define LIBAVUTIL_VERSION_CHECK( a, b, c, d, e ) \ -+#define LIBAV_UTIL_VERSION_CHECK( a, b, c, d, e ) \ - ( (LIBAVUTIL_VERSION_MICRO < 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ - (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) - --#if !LIBAVUTIL_VERSION_CHECK( 52, 11, 0, 32, 100 ) -+#if !LIBAV_UTIL_VERSION_CHECK( 52, 11, 0, 32, 100 ) - # define AV_PIX_FMT_FLAG_HWACCEL PIX_FMT_HWACCEL - #endif - -diff --git a/modules/codec/avcodec/chroma.c b/modules/codec/avcodec/chroma.c -index cb9634db5970..da20bcb10b35 100644 ---- a/modules/codec/avcodec/chroma.c -+++ b/modules/codec/avcodec/chroma.c -@@ -180,7 +180,7 @@ static const struct - {VLC_CODEC_GBR_PLANAR_16B, AV_PIX_FMT_GBRP16BE, 0, 0, 0 }, - - /* XYZ */ --#if LIBAVUTIL_VERSION_CHECK(52, 10, 0, 25, 100) -+#if LIBAV_UTIL_VERSION_CHECK(52, 10, 0, 25, 100) - {VLC_CODEC_XYZ12, AV_PIX_FMT_XYZ12, 0xfff0, 0xfff0, 0xfff0}, - #endif - { 0, 0, 0, 0, 0 } -diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c -index ae746c99fc89..c9a34d8f0da5 100644 ---- a/modules/codec/avcodec/encoder.c -+++ b/modules/codec/avcodec/encoder.c -@@ -47,7 +47,7 @@ - #include "avcodec.h" - #include "avcommon.h" - --#define API_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 100)) -+#define API_CHANNEL_LAYOUT (LIBAV_UTIL_VERSION_CHECK( 52, 2, 6, 0, 100)) - - #if API_CHANNEL_LAYOUT - # include -diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c -index 0feb03b974fb..06de54ddcf0d 100644 ---- a/modules/codec/avcodec/va.c -+++ b/modules/codec/avcodec/va.c -@@ -58,7 +58,7 @@ vlc_fourcc_t vlc_va_GetChroma(enum PixelFormat hwfmt, enum PixelFormat swfmt) - } - break; - --#if LIBAVUTIL_VERSION_CHECK(54, 13, 1, 24, 100) -+#if LIBAV_UTIL_VERSION_CHECK(54, 13, 1, 24, 100) - case AV_PIX_FMT_D3D11VA_VLD: - switch (swfmt) - { -diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index 8c892dd3f484..deefd3076a9b 100644 ---- a/modules/codec/avcodec/video.c -+++ b/modules/codec/avcodec/video.c -@@ -257,12 +257,12 @@ static int lavc_GetVideoFormat(decoder_t *dec, video_format_t *restrict fmt, - case AVCOL_TRC_BT2020_12: - fmt->transfer = TRANSFER_FUNC_BT2020; - break; --#if LIBAVUTIL_VERSION_CHECK( 55, 14, 0, 31, 100) -+#if LIBAV_UTIL_VERSION_CHECK( 55, 14, 0, 31, 100) - case AVCOL_TRC_ARIB_STD_B67: - fmt->transfer = TRANSFER_FUNC_ARIB_B67; - break; - #endif --#if LIBAVUTIL_VERSION_CHECK( 55, 17, 0, 37, 100) -+#if LIBAV_UTIL_VERSION_CHECK( 55, 17, 0, 37, 100) - case AVCOL_TRC_SMPTE2084: - fmt->transfer = TRANSFER_FUNC_SMPTE_ST2084; - break; -@@ -687,7 +687,7 @@ static int ffmpeg_OpenVa(decoder_t *p_dec, AVCodecContext *p_context, - static const enum PixelFormat hwfmts[] = - { - #ifdef _WIN32 --#if LIBAVUTIL_VERSION_CHECK(54, 13, 1, 24, 100) -+#if LIBAV_UTIL_VERSION_CHECK(54, 13, 1, 24, 100) - AV_PIX_FMT_D3D11VA_VLD, - #endif - AV_PIX_FMT_DXVA2_VLD, --- -GitLab - - -From 5efaca393b7388d629bba920127eb5465325c436 Mon Sep 17 00:00:00 2001 -From: Steve Lhomme -Date: Wed, 19 Jun 2024 13:56:31 +0200 -Subject: [PATCH 02/15] avcommon: use a specific macro to check the FFmpeg - libavutil version - -This macro doesn't check for libav which is assumed to not have to relevant -code. This is the same macro name used in VLC 4.0. ---- - modules/codec/avcodec/avcommon_compat.h | 6 +++++- - modules/codec/avcodec/chroma.c | 8 ++++---- - modules/codec/avcodec/video.c | 7 ++++--- - 3 files changed, 13 insertions(+), 8 deletions(-) - -diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h -index bb2b9ae03e54..5bade93b3c5f 100644 ---- a/modules/codec/avcodec/avcommon_compat.h -+++ b/modules/codec/avcodec/avcommon_compat.h -@@ -86,7 +86,11 @@ - #ifdef HAVE_LIBAVUTIL_AVUTIL_H - # include - --/* LIBAV_UTIL_VERSION_CHECK checks for the right version of libav and FFmpeg -+/* check the FFmpeg libavutil version */ -+#define LIBAVUTIL_VERSION_CHECK( a, d, e ) \ -+ (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) -+ -+/* LIBAV_UTIL_VERSION_CHECK checks for the right libavutil version of libav and FFmpeg - * a is the major version - * b and c the minor and micro versions of libav - * d and e the minor and micro versions of FFmpeg */ -diff --git a/modules/codec/avcodec/chroma.c b/modules/codec/avcodec/chroma.c -index da20bcb10b35..156fb0beec80 100644 ---- a/modules/codec/avcodec/chroma.c -+++ b/modules/codec/avcodec/chroma.c -@@ -86,7 +86,7 @@ static const struct - {VLC_CODEC_I420_9B, AV_PIX_FMT_YUV420P9BE, 0, 0, 0 }, - {VLC_CODEC_I420_10L, AV_PIX_FMT_YUV420P10LE, 0, 0, 0 }, - {VLC_CODEC_I420_10B, AV_PIX_FMT_YUV420P10BE, 0, 0, 0 }, --#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) ) -+#if LIBAVUTIL_VERSION_CHECK( 54, 17, 100 ) - {VLC_CODEC_I420_12L, AV_PIX_FMT_YUV420P12LE, 0, 0, 0 }, - {VLC_CODEC_I420_12B, AV_PIX_FMT_YUV420P12BE, 0, 0, 0 }, - #endif -@@ -100,7 +100,7 @@ static const struct - {VLC_CODEC_I422_9B, AV_PIX_FMT_YUV422P9BE, 0, 0, 0 }, - {VLC_CODEC_I422_10L, AV_PIX_FMT_YUV422P10LE, 0, 0, 0 }, - {VLC_CODEC_I422_10B, AV_PIX_FMT_YUV422P10BE, 0, 0, 0 }, --#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) ) -+#if LIBAVUTIL_VERSION_CHECK( 54, 17, 100 ) - {VLC_CODEC_I422_12L, AV_PIX_FMT_YUV422P12LE, 0, 0, 0 }, - {VLC_CODEC_I422_12B, AV_PIX_FMT_YUV422P12BE, 0, 0, 0 }, - #endif -@@ -116,7 +116,7 @@ static const struct - {VLC_CODEC_I444_9B, AV_PIX_FMT_YUV444P9BE, 0, 0, 0 }, - {VLC_CODEC_I444_10L, AV_PIX_FMT_YUV444P10LE, 0, 0, 0 }, - {VLC_CODEC_I444_10B, AV_PIX_FMT_YUV444P10BE, 0, 0, 0 }, --#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) ) -+#if LIBAVUTIL_VERSION_CHECK( 54, 17, 100 ) - {VLC_CODEC_I444_12L, AV_PIX_FMT_YUV444P12LE, 0, 0, 0 }, - {VLC_CODEC_I444_12B, AV_PIX_FMT_YUV444P12BE, 0, 0, 0 }, - #endif -@@ -145,7 +145,7 @@ static const struct - VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_0BGR32, AV_PIX_FMT_0RGB32, 0x000000ff, 0x0000ff00, 0x00ff0000 ) - #endif - --#if (LIBAVUTIL_VERSION_MICRO == 0 || LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 0, 100 ) ) -+#if (LIBAVUTIL_VERSION_MICRO == 0 || LIBAVUTIL_VERSION_CHECK( 55, 0, 100 ) ) - #ifdef WORDS_BIGENDIAN - {VLC_CODEC_RGBA64, AV_PIX_FMT_RGBA64BE, 0, 0, 0 }, - #else /* !WORDS_BIGENDIAN */ -diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index deefd3076a9b..d3284da8aed5 100644 ---- a/modules/codec/avcodec/video.c -+++ b/modules/codec/avcodec/video.c -@@ -39,7 +39,8 @@ - #include - #include - #include --#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 16, 101 ) ) -+#include "avcommon_compat.h" -+#if LIBAVUTIL_VERSION_CHECK( 55, 16, 101 ) - #include - #endif - -@@ -995,7 +996,7 @@ static int DecodeSidedata( decoder_t *p_dec, const AVFrame *frame, picture_t *p_ - decoder_sys_t *p_sys = p_dec->p_sys; - bool format_changed = false; - --#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 16, 101 ) ) -+#if LIBAVUTIL_VERSION_CHECK( 55, 16, 101 ) - #define FROM_AVRAT(default_factor, avrat) \ - (uint64_t)(default_factor) * (avrat).num / (avrat).den - const AVFrameSideData *metadata = -@@ -1050,7 +1051,7 @@ static int DecodeSidedata( decoder_t *p_dec, const AVFrame *frame, picture_t *p_ - #undef FROM_AVRAT - } - #endif --#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 60, 100 ) ) -+#if LIBAVUTIL_VERSION_CHECK( 55, 60, 100 ) - const AVFrameSideData *metadata_lt = - av_frame_get_side_data( frame, - AV_FRAME_DATA_CONTENT_LIGHT_LEVEL ); --- -GitLab - - -From 554a97ab33cd680b60731ec85fd9122329291725 Mon Sep 17 00:00:00 2001 -From: Steve Lhomme -Date: Thu, 7 Nov 2024 07:22:26 +0100 -Subject: [PATCH 03/15] avcommon: rename LIBAVFORMAT_VERSION_CHECK to - LIBAV_FORMAT_VERSION_CHECK - -The LIBAVFORMAT_VERSION_CHECK form will be for checks also done in 4.0. - -No functional changes. ---- - modules/codec/avcodec/avcommon_compat.h | 2 +- - modules/demux/avformat/mux.c | 10 +++++----- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h -index 5bade93b3c5f..d0096bc1bbb3 100644 ---- a/modules/codec/avcodec/avcommon_compat.h -+++ b/modules/codec/avcodec/avcommon_compat.h -@@ -126,7 +126,7 @@ - #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H - # include - --#define LIBAVFORMAT_VERSION_CHECK( a, b, c, d, e ) \ -+#define LIBAV_FORMAT_VERSION_CHECK( a, b, c, d, e ) \ - ( (LIBAVFORMAT_VERSION_MICRO < 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ - (LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) - -diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c -index 033a87bdaaad..182e94587ad6 100644 ---- a/modules/demux/avformat/mux.c -+++ b/modules/demux/avformat/mux.c -@@ -61,7 +61,7 @@ struct sout_mux_sys_t - bool b_write_header; - bool b_write_keyframe; - bool b_error; --#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) -+#if LIBAV_FORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) - bool b_header_done; - #endif - }; -@@ -80,7 +80,7 @@ static int IOWrite( void *opaque, uint8_t *buf, int buf_size ); - 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 LIBAV_FORMAT_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); -@@ -168,7 +168,7 @@ int avformat_OpenMux( vlc_object_t *p_this ) - p_sys->b_write_header = true; - p_sys->b_write_keyframe = false; - p_sys->b_error = false; --#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) -+#if LIBAV_FORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) - p_sys->io->write_data_type = IOWriteTyped; - p_sys->b_header_done = false; - #endif -@@ -419,7 +419,7 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input ) - return VLC_SUCCESS; - } - --#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) -+#if LIBAV_FORMAT_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) -@@ -545,7 +545,7 @@ static int IOWrite( void *opaque, const uint8_t *buf, int buf_size ) - - if( p_sys->b_write_header ) - p_buf->i_flags |= BLOCK_FLAG_HEADER; --#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) -+#if LIBAV_FORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) - if( !p_sys->b_header_done ) - p_buf->i_flags |= BLOCK_FLAG_HEADER; - #endif --- -GitLab - - -From d406a3127635afcba2436cbc9cbb3efbdc826331 Mon Sep 17 00:00:00 2001 -From: Steve Lhomme -Date: Wed, 19 Jun 2024 13:57:24 +0200 -Subject: [PATCH 04/15] avcommon: use a specific macro to check the FFmpeg - libavformat version - -This macro doesn't check for libav which is assumed to not have to relevant -code. This is the same macro name used in VLC 4.0. ---- - modules/codec/avcodec/avcommon.h | 2 +- - modules/codec/avcodec/avcommon_compat.h | 8 ++++++++ - modules/demux/avformat/demux.c | 3 +-- - modules/demux/avformat/mux.c | 11 ++++------- - 4 files changed, 14 insertions(+), 10 deletions(-) - -diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h -index ff5dba06c921..aa0c0b88b859 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_CHECK(58, 9, 100)) - av_register_all(); - #endif - -diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h -index d0096bc1bbb3..3feab3a657e5 100644 ---- a/modules/codec/avcodec/avcommon_compat.h -+++ b/modules/codec/avcodec/avcommon_compat.h -@@ -126,6 +126,14 @@ - #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H - # include - -+/* check the FFmpeg libavformat version */ -+#define LIBAVFORMAT_VERSION_CHECK( a, d, e ) \ -+ (LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) -+ -+/* LIBAV_FORMAT_VERSION_CHECK checks for the right libavformat version of libav and FFmpeg -+ * a is the major version -+ * b and c the minor and micro versions of libav -+ * d and e the minor and micro versions of FFmpeg */ - #define LIBAV_FORMAT_VERSION_CHECK( a, b, c, d, e ) \ - ( (LIBAVFORMAT_VERSION_MICRO < 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ - (LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) -diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c -index 830dc0157e2b..39d2366cef2b 100644 ---- a/modules/demux/avformat/demux.c -+++ b/modules/demux/avformat/demux.c -@@ -52,8 +52,7 @@ - - # define HAVE_AVUTIL_CODEC_ATTACHMENT 1 - --#if LIBAVFORMAT_VERSION_MICRO >= 100 && \ -- LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(59, 0, 100) -+#if LIBAVFORMAT_VERSION_CHECK(59, 0, 100) - # define AVF_MAYBE_CONST const - #else - # define AVF_MAYBE_CONST -diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c -index 182e94587ad6..664a646734c0 100644 ---- a/modules/demux/avformat/mux.c -+++ b/modules/demux/avformat/mux.c -@@ -95,8 +95,7 @@ int IOWriteTyped(void *opaque, const uint8_t *buf, int buf_size, - *****************************************************************************/ - int avformat_OpenMux( vlc_object_t *p_this ) - { --#if LIBAVFORMAT_VERSION_MICRO >= 100 && \ -- LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(59, 0, 100) -+#if LIBAVFORMAT_VERSION_CHECK(59, 0, 100) - const AVOutputFormat *file_oformat; - #else - AVOutputFormat *file_oformat; -@@ -104,8 +103,7 @@ int avformat_OpenMux( vlc_object_t *p_this ) - sout_mux_t *p_mux = (sout_mux_t*)p_this; - bool dummy = !strcmp( p_mux->p_access->psz_access, "dummy"); - --#if ( (LIBAVFORMAT_VERSION_MICRO >= 100) \ -- && (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 7, 100)) ) -+#if LIBAVFORMAT_VERSION_MICRO >= 100 && !(LIBAVFORMAT_VERSION_CHECK(58, 7, 100)) - if( dummy && strlen(p_mux->p_access->psz_path) - >= sizeof (((AVFormatContext *)NULL)->filename) ) - return VLC_EGENERIC; -@@ -144,8 +142,7 @@ int avformat_OpenMux( vlc_object_t *p_this ) - p_sys->oc->oformat = file_oformat; - /* If we use dummy access, let avformat write output */ - if( dummy ) --#if ( (LIBAVFORMAT_VERSION_MICRO >= 100) \ -- && (LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(58, 7, 100)) ) -+#if LIBAVFORMAT_VERSION_CHECK(58, 7, 100) - p_sys->oc->url = av_strdup(p_mux->p_access->psz_path); - #else - strcpy( p_sys->oc->filename, p_mux->p_access->psz_path ); -@@ -397,7 +394,7 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input ) - pkt->dts = p_data->i_dts * p_stream->time_base.den / - CLOCK_FREQ / p_stream->time_base.num; - --#if LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(59, 2, 103) -+#if LIBAVFORMAT_VERSION_MICRO >= 100 && !(LIBAVFORMAT_VERSION_CHECK(59, 2, 103)) - /* 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; --- -GitLab - - -From 930ddc0d0fec55fff6c2ed0ffcc904773bae6622 Mon Sep 17 00:00:00 2001 -From: Steve Lhomme -Date: Thu, 7 Nov 2024 07:23:27 +0100 -Subject: [PATCH 05/15] avcommon: rename LIBAVCODEC_VERSION_CHECK to - LIBAV_CODEC_VERSION_CHECK - -The LIBAVCODEC_VERSION_CHECK form will be for checks also done in 4.0. - -No functional changes. ---- - modules/codec/avcodec/audio.c | 8 ++++---- - modules/codec/avcodec/avcommon_compat.h | 4 ++-- - modules/codec/avcodec/d3d11va.c | 4 ++-- - modules/codec/avcodec/encoder.c | 10 +++++----- - modules/codec/avcodec/fourcc.c | 14 +++++++------- - modules/codec/avcodec/video.c | 2 +- - 6 files changed, 21 insertions(+), 21 deletions(-) - -diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c -index 44335ec3cced..7a979e96e191 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -142,7 +142,7 @@ 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) -+#if LIBAV_CODEC_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; -@@ -402,7 +402,7 @@ 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) -+#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) - int channels = frame->ch_layout.nb_channels; - #else - int channels = ctx->channels; -@@ -592,7 +592,7 @@ 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 LIBAV_CODEC_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; -@@ -617,7 +617,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) - - int i_channels_src = 0, channel_count; - uint64_t channel_layout_mask; --#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100) -+#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) - 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 -diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h -index 3feab3a657e5..b504fcd82186 100644 ---- a/modules/codec/avcodec/avcommon_compat.h -+++ b/modules/codec/avcodec/avcommon_compat.h -@@ -30,11 +30,11 @@ - #ifdef HAVE_LIBAVCODEC_AVCODEC_H - #include - --/* LIBAVCODEC_VERSION_CHECK checks for the right version of libav and FFmpeg -+/* LIBAV_CODEC_VERSION_CHECK checks for the right version of libav and FFmpeg - * a is the major version - * b and c the minor and micro versions of libav - * d and e the minor and micro versions of FFmpeg */ --#define LIBAVCODEC_VERSION_CHECK( a, b, c, d, e ) \ -+#define LIBAV_CODEC_VERSION_CHECK( a, b, c, d, e ) \ - ( (LIBAVCODEC_VERSION_MICRO < 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ - (LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) - -diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c -index 5260628364f0..e1c10d31188e 100644 ---- a/modules/codec/avcodec/d3d11va.c -+++ b/modules/codec/avcodec/d3d11va.c -@@ -76,7 +76,7 @@ vlc_module_end() - * So we get the surfaces from the decoder pool when needed. We don't need to - * extract the decoded surface into the decoder picture anymore. - */ --#define D3D11_DIRECT_DECODE LIBAVCODEC_VERSION_CHECK( 57, 30, 3, 72, 101 ) -+#define D3D11_DIRECT_DECODE LIBAV_CODEC_VERSION_CHECK( 57, 30, 3, 72, 101 ) - - #include /* must be last included to not redefine existing GUIDs */ - -@@ -764,7 +764,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id, - assert(texDesc.Format == sys->render); - assert(texDesc.BindFlags & D3D11_BIND_DECODER); - --#if !LIBAVCODEC_VERSION_CHECK( 57, 27, 2, 61, 102 ) -+#if !LIBAV_CODEC_VERSION_CHECK( 57, 27, 2, 61, 102 ) - if (pic->p_sys->slice_index != surface_idx) - { - msg_Warn(va, "d3d11va requires decoding slices to be the first in the texture (%d/%d)", -diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c -index c9a34d8f0da5..9cf9a7d0607d 100644 ---- a/modules/codec/avcodec/encoder.c -+++ b/modules/codec/avcodec/encoder.c -@@ -183,7 +183,7 @@ static const uint64_t pi_channels_map[][2] = - { AV_CH_STEREO_RIGHT, 0 }, - }; - --# if !LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100) -+# if !LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) - static const uint32_t channel_mask[][2] = { - {0,0}, - {AOUT_CHAN_CENTER, AV_CH_LAYOUT_MONO}, -@@ -765,7 +765,7 @@ int InitVideoEnc( vlc_object_t *p_this ) - uint32_t order_mask = 0; - int i_channels_src = 0; - msg_Dbg( p_enc, "Creating channel order for reordering"); --# if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100) -+# if LIBAV_CODEC_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 -@@ -918,7 +918,7 @@ errmsg: - - if( p_enc->fmt_out.audio.i_channels > 2 ) - { --#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100) -+#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) - av_channel_layout_default( &p_context->ch_layout, 2 ); - #else - p_context->channels = 2; -@@ -1282,7 +1282,7 @@ 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) -+#if LIBAV_CODEC_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; -@@ -1417,7 +1417,7 @@ 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) -+#if LIBAV_CODEC_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; -diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c -index 97f3188211d3..3aea6b58ff04 100644 ---- a/modules/codec/avcodec/fourcc.c -+++ b/modules/codec/avcodec/fourcc.c -@@ -230,7 +230,7 @@ static const struct vlc_avcodec_fourcc video_codecs[] = - { VLC_CODEC_CLLC, AV_CODEC_ID_CLLC }, - { VLC_CODEC_MSS2, AV_CODEC_ID_MSS2 }, - { VLC_CODEC_VP9, AV_CODEC_ID_VP9 }, --#if LIBAVCODEC_VERSION_CHECK( 57, 26, 0, 83, 101 ) -+#if LIBAV_CODEC_VERSION_CHECK( 57, 26, 0, 83, 101 ) - { VLC_CODEC_AV1, AV_CODEC_ID_AV1 }, - #endif - { VLC_CODEC_ICOD, AV_CODEC_ID_AIC }, -@@ -285,19 +285,19 @@ static const struct vlc_avcodec_fourcc video_codecs[] = - /* ffmpeg only: AV_CODEC_ID_SNOW */ - /* ffmpeg only: AV_CODEC_ID_SMVJPEG */ - --#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 24, 102 ) -+#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 24, 102 ) - { VLC_CODEC_CINEFORM, AV_CODEC_ID_CFHD }, - #endif - --#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 70, 100 ) -+#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 70, 100 ) - { VLC_CODEC_PIXLET, AV_CODEC_ID_PIXLET }, - #endif - --#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 101 ) -+#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 71, 101 ) - { VLC_CODEC_SPEEDHQ, AV_CODEC_ID_SPEEDHQ }, - #endif - --#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 79, 100 ) -+#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 79, 100 ) - { VLC_CODEC_FMVC, AV_CODEC_ID_FMVC }, - #endif - }; -@@ -414,7 +414,7 @@ static const struct vlc_avcodec_fourcc audio_codecs[] = - /* AV_CODEC_ID_WESTWOOD_SND1 */ - { VLC_CODEC_GSM, AV_CODEC_ID_GSM }, - { VLC_CODEC_QDM2, AV_CODEC_ID_QDM2 }, --#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) -+#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) - { VLC_CODEC_QDMC, AV_CODEC_ID_QDMC }, - #endif - { VLC_CODEC_COOK, AV_CODEC_ID_COOK }, -@@ -482,7 +482,7 @@ static const struct vlc_avcodec_fourcc spu_codecs[] = - { VLC_CODEC_SSA, AV_CODEC_ID_SSA }, - /* AV_CODEC_ID_MOV_TEXT */ - { VLC_CODEC_BD_PG, AV_CODEC_ID_HDMV_PGS_SUBTITLE }, --#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) -+#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) - { VLC_CODEC_BD_TEXT, AV_CODEC_ID_HDMV_TEXT_SUBTITLE }, - #endif - { VLC_CODEC_TELETEXT, AV_CODEC_ID_DVB_TELETEXT }, -diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index d3284da8aed5..552c602edf6a 100644 ---- a/modules/codec/avcodec/video.c -+++ b/modules/codec/avcodec/video.c -@@ -1307,7 +1307,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error - } - - /* Compute the PTS */ --#if LIBAVCODEC_VERSION_CHECK(57, 24, 0, 61, 100) -+#if LIBAV_CODEC_VERSION_CHECK(57, 24, 0, 61, 100) - # if LIBAVCODEC_VERSION_MICRO >= 100 - vlc_tick_t i_pts = frame->best_effort_timestamp; - # else --- -GitLab - - -From ce084152c9bade041ca18e19c3b264e4e134c6c3 Mon Sep 17 00:00:00 2001 -From: Steve Lhomme -Date: Wed, 19 Jun 2024 13:59:15 +0200 -Subject: [PATCH 06/15] avcommon: use a specific macro to check the FFmpeg - libavcodec version - -This macro doesn't check for libav which is assumed to not have to relevant -code. This is the same macro name used in VLC 4.0. ---- - modules/codec/avcodec/audio.c | 8 ++++---- - modules/codec/avcodec/avcommon.h | 2 +- - modules/codec/avcodec/avcommon_compat.h | 4 ++++ - modules/codec/avcodec/directx_va.c | 4 ++-- - modules/codec/avcodec/encoder.c | 13 ++++++------- - modules/codec/avcodec/fourcc.c | 18 ++++++++---------- - modules/codec/avcodec/video.c | 3 +-- - modules/demux/avformat/demux.c | 2 +- - modules/demux/avformat/mux.c | 2 +- - 9 files changed, 28 insertions(+), 28 deletions(-) - -diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c -index 7a979e96e191..a3f67f7bd934 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -142,7 +142,7 @@ static int OpenAudioCodec( decoder_t *p_dec ) - } - - ctx->sample_rate = p_dec->fmt_in.audio.i_rate; --#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) -+#if LIBAVCODEC_VERSION_CHECK(59, 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; -@@ -402,7 +402,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block ) - ret = avcodec_receive_frame( ctx, frame ); - if( ret == 0 ) - { --#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) - int channels = frame->ch_layout.nb_channels; - #else - int channels = ctx->channels; -@@ -592,7 +592,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) - p_dec->fmt_out.audio.i_rate = p_sys->p_context->sample_rate; - - /* */ --#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) -+#if LIBAVCODEC_VERSION_CHECK(59, 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; -@@ -617,7 +617,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) - - int i_channels_src = 0, channel_count; - uint64_t channel_layout_mask; --#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) - 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 -diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h -index aa0c0b88b859..10ad13dc5f8a 100644 ---- a/modules/codec/avcodec/avcommon.h -+++ b/modules/codec/avcodec/avcommon.h -@@ -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_CHECK(58, 10, 100)) - avcodec_register_all(); - #endif - -diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h -index b504fcd82186..ac02c06d2339 100644 ---- a/modules/codec/avcodec/avcommon_compat.h -+++ b/modules/codec/avcodec/avcommon_compat.h -@@ -30,6 +30,10 @@ - #ifdef HAVE_LIBAVCODEC_AVCODEC_H - #include - -+/* check the FFmpeg libavutil version */ -+#define LIBAVCODEC_VERSION_CHECK( a, d, e ) \ -+ (LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) -+ - /* LIBAV_CODEC_VERSION_CHECK checks for the right version of libav and FFmpeg - * a is the major version - * b and c the minor and micro versions of libav -diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c -index 5b7980fd97df..36a5d61a5590 100644 ---- a/modules/codec/avcodec/directx_va.c -+++ b/modules/codec/avcodec/directx_va.c -@@ -284,7 +284,7 @@ static const directx_va_mode_t DXVA_MODES[] = { - - /* VPx */ - { "VP8", &DXVA_ModeVP8_VLD, 8, 0, NULL }, --#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 57, 17, 100 ) && LIBAVCODEC_VERSION_MICRO >= 100 -+#if LIBAVCODEC_VERSION_CHECK( 57, 17, 100 ) - { "VP9 profile 0", &DXVA_ModeVP9_VLD_Profile0, 8, AV_CODEC_ID_VP9, PROF_VP9_MAIN }, - { "VP9 profile 2", &DXVA_ModeVP9_VLD_10bit_Profile2, 10, AV_CODEC_ID_VP9, PROF_VP9_10 }, - #else -@@ -294,7 +294,7 @@ static const directx_va_mode_t DXVA_MODES[] = { - { "VP9 profile Intel", &DXVA_ModeVP9_VLD_Intel, 8, 0, NULL }, - - /* AV1 */ --#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 58, 112, 103 ) && LIBAVCODEC_VERSION_MICRO >= 100 -+#if LIBAVCODEC_VERSION_CHECK( 58, 112, 103 ) - { "AV1 Main profile 8", &DXVA_ModeAV1_VLD_Profile0, 8, AV_CODEC_ID_AV1, PROF_AV1_MAIN }, - { "AV1 Main profile 10", &DXVA_ModeAV1_VLD_Profile0, 10, AV_CODEC_ID_AV1, PROF_AV1_MAIN }, - { "AV1 High profile 8", &DXVA_ModeAV1_VLD_Profile1, 8, AV_CODEC_ID_AV1, PROF_AV1_HIGH }, -diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c -index 9cf9a7d0607d..2014b8afaf52 100644 ---- a/modules/codec/avcodec/encoder.c -+++ b/modules/codec/avcodec/encoder.c -@@ -61,8 +61,7 @@ - - #define RAW_AUDIO_FRAME_SIZE (2048) - --#if LIBAVCODEC_VERSION_MICRO >= 100 && \ -- LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59, 0, 100) -+#if LIBAVCODEC_VERSION_CHECK(59, 0, 100) - # define AVC_MAYBE_CONST const - #else - # define AVC_MAYBE_CONST -@@ -183,7 +182,7 @@ static const uint64_t pi_channels_map[][2] = - { AV_CH_STEREO_RIGHT, 0 }, - }; - --# if !LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) -+# if !LIBAVCODEC_VERSION_CHECK(59, 24, 100) - static const uint32_t channel_mask[][2] = { - {0,0}, - {AOUT_CHAN_CENTER, AV_CH_LAYOUT_MONO}, -@@ -765,7 +764,7 @@ int InitVideoEnc( vlc_object_t *p_this ) - uint32_t order_mask = 0; - int i_channels_src = 0; - msg_Dbg( p_enc, "Creating channel order for reordering"); --# if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) -+# if LIBAVCODEC_VERSION_CHECK(59, 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 -@@ -918,7 +917,7 @@ errmsg: - - if( p_enc->fmt_out.audio.i_channels > 2 ) - { --#if LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) - av_channel_layout_default( &p_context->ch_layout, 2 ); - #else - p_context->channels = 2; -@@ -1282,7 +1281,7 @@ 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 LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) -+#if LIBAVCODEC_VERSION_CHECK(59, 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; -@@ -1417,7 +1416,7 @@ 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 LIBAV_CODEC_VERSION_CHECK(59, 999, 999, 24, 100) -+#if LIBAVCODEC_VERSION_CHECK(59, 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; -diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c -index 3aea6b58ff04..d75c21ffa495 100644 ---- a/modules/codec/avcodec/fourcc.c -+++ b/modules/codec/avcodec/fourcc.c -@@ -182,12 +182,10 @@ 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_MICRO >= 100 --# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 59, 42, 102 ) -+#if LIBAVCODEC_VERSION_CHECK( 59, 42, 102 ) - { VLC_CODEC_VUYA, AV_CODEC_ID_RAWVIDEO }, --# elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 54, 50, 100 ) -+#elif LIBAVCODEC_VERSION_CHECK( 54, 50, 100 ) - { VLC_CODEC_VUYA, AV_CODEC_ID_AYUV }, --# endif - #endif - /* AV_CODEC_ID_DPX */ - { VLC_CODEC_MAD, AV_CODEC_ID_MAD }, -@@ -285,19 +283,19 @@ static const struct vlc_avcodec_fourcc video_codecs[] = - /* ffmpeg only: AV_CODEC_ID_SNOW */ - /* ffmpeg only: AV_CODEC_ID_SMVJPEG */ - --#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 24, 102 ) -+#if LIBAVCODEC_VERSION_CHECK( 57, 24, 102 ) - { VLC_CODEC_CINEFORM, AV_CODEC_ID_CFHD }, - #endif - --#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 70, 100 ) -+#if LIBAVCODEC_VERSION_CHECK( 57, 70, 100 ) - { VLC_CODEC_PIXLET, AV_CODEC_ID_PIXLET }, - #endif - --#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 71, 101 ) -+#if LIBAVCODEC_VERSION_CHECK( 57, 71, 101 ) - { VLC_CODEC_SPEEDHQ, AV_CODEC_ID_SPEEDHQ }, - #endif - --#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 79, 100 ) -+#if LIBAVCODEC_VERSION_CHECK( 57, 79, 100 ) - { VLC_CODEC_FMVC, AV_CODEC_ID_FMVC }, - #endif - }; -@@ -414,7 +412,7 @@ static const struct vlc_avcodec_fourcc audio_codecs[] = - /* AV_CODEC_ID_WESTWOOD_SND1 */ - { VLC_CODEC_GSM, AV_CODEC_ID_GSM }, - { VLC_CODEC_QDM2, AV_CODEC_ID_QDM2 }, --#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) -+#if LIBAVCODEC_VERSION_CHECK( 57, 71, 100 ) - { VLC_CODEC_QDMC, AV_CODEC_ID_QDMC }, - #endif - { VLC_CODEC_COOK, AV_CODEC_ID_COOK }, -@@ -482,7 +480,7 @@ static const struct vlc_avcodec_fourcc spu_codecs[] = - { VLC_CODEC_SSA, AV_CODEC_ID_SSA }, - /* AV_CODEC_ID_MOV_TEXT */ - { VLC_CODEC_BD_PG, AV_CODEC_ID_HDMV_PGS_SUBTITLE }, --#if LIBAV_CODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) -+#if LIBAVCODEC_VERSION_CHECK( 57, 71, 100 ) - { VLC_CODEC_BD_TEXT, AV_CODEC_ID_HDMV_TEXT_SUBTITLE }, - #endif - { VLC_CODEC_TELETEXT, AV_CODEC_ID_DVB_TELETEXT }, -diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index 552c602edf6a..c306e916c7d6 100644 ---- a/modules/codec/avcodec/video.c -+++ b/modules/codec/avcodec/video.c -@@ -1824,8 +1824,7 @@ no_reuse: - if (!can_hwaccel) - return swfmt; - --#if (LIBAVCODEC_VERSION_MICRO >= 100) \ -- && (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57, 83, 101)) -+#if (LIBAVCODEC_VERSION_MICRO >= 100) && !(LIBAVCODEC_VERSION_CHECK(57, 83, 101)) - if (p_context->active_thread_type) - { - msg_Warn(p_dec, "thread type %d: disabling hardware acceleration", -diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c -index 39d2366cef2b..9975b0f47b67 100644 ---- a/modules/demux/avformat/demux.c -+++ b/modules/demux/avformat/demux.c -@@ -400,7 +400,7 @@ 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 -+#if LIBAVCODEC_VERSION_CHECK( 59, 24, 100 ) - es_fmt.audio.i_channels = cp->ch_layout.nb_channels; - #else - es_fmt.audio.i_channels = cp->channels; -diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c -index 664a646734c0..a48190c93ca0 100644 ---- a/modules/demux/avformat/mux.c -+++ b/modules/demux/avformat/mux.c -@@ -273,7 +273,7 @@ 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 -+#if LIBAVCODEC_VERSION_CHECK( 59, 24, 100 ) - av_channel_layout_default( &codecpar->ch_layout, fmt->audio.i_channels ); - #else - codecpar->channels = fmt->audio.i_channels; --- -GitLab - - -From 534564b289db7ee966abf888207258c3e6828c98 Mon Sep 17 00:00:00 2001 -From: Zhao Zhili -Date: Fri, 11 Jun 2021 18:02:34 +0800 -Subject: [PATCH 07/15] codec: avcodec: check open codec return value - -(cherry picked from commit 21ab6be22e7c1831cebf023fd53bd7ffbfad22f6) (edited) -edited: -- on 3.0 DecodeBlock returns a picture_t, not an error code ---- - modules/codec/avcodec/audio.c | 7 ++++++- - modules/codec/avcodec/video.c | 11 +++++++---- - 2 files changed, 13 insertions(+), 5 deletions(-) - -diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c -index a3f67f7bd934..e8436754f4a5 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -309,7 +309,12 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block ) - && !avcodec_is_open( ctx ) ) - { - InitDecoderConfig( p_dec, ctx ); -- OpenAudioCodec( p_dec ); -+ if( OpenAudioCodec( p_dec ) < 0 ) -+ { -+ if( pp_block != NULL && *pp_block != NULL ) -+ block_Release( *pp_block ); -+ return VLCDEC_ECRITICAL; -+ } - } - - if( !avcodec_is_open( ctx ) ) -diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index c306e916c7d6..096a0b7940e2 100644 ---- a/modules/codec/avcodec/video.c -+++ b/modules/codec/avcodec/video.c -@@ -1114,17 +1114,20 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error - bool eos_spotted = false; - - -- block_t *p_block; -+ block_t *p_block = pp_block ? *pp_block : NULL; - vlc_tick_t current_time; - - if( !p_context->extradata_size && p_dec->fmt_in.i_extra ) - { - ffmpeg_InitCodec( p_dec ); -- if( !avcodec_is_open( p_context ) ) -- OpenVideoCodec( p_dec ); -+ if( !avcodec_is_open( p_context ) && OpenVideoCodec(p_dec) < 0 ) -+ { -+ if( p_block != NULL ) -+ block_Release( p_block ); -+ return NULL; -+ } - } - -- p_block = pp_block ? *pp_block : NULL; - if(!p_block && !(p_sys->p_codec->capabilities & AV_CODEC_CAP_DELAY) ) - return NULL; - --- -GitLab - - -From b2b54eb1efa3ecc72a4a64d0d962cab0676fbce1 Mon Sep 17 00:00:00 2001 -From: Steve Lhomme -Date: Fri, 6 Jan 2023 10:16:09 +0100 -Subject: [PATCH 08/15] avcodec: use ARRAY_SIZE instead of custom code - -(cherry picked from commit 28c80ee47e6cdf961f501eed9d4837956b38afd1) ---- - modules/codec/avcodec/audio.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c -index e8436754f4a5..20744010433b 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -558,7 +558,7 @@ vlc_fourcc_t GetVlcAudioFormat( int fmt ) - [AV_SAMPLE_FMT_FLTP] = VLC_CODEC_FL32, - [AV_SAMPLE_FMT_DBLP] = VLC_CODEC_FL64, - }; -- if( (sizeof(fcc) / sizeof(fcc[0])) > (unsigned)fmt ) -+ if( ARRAY_SIZE(fcc) > (unsigned)fmt ) - return fcc[fmt]; - return VLC_CODEC_S16N; - } --- -GitLab - - -From 763dc3eba52cb7633a84f44dcde19602fca5eac7 Mon Sep 17 00:00:00 2001 -From: Ilkka Ollakka -Date: Wed, 5 Jul 2023 15:09:57 +0300 -Subject: [PATCH 09/15] avcodec/audio: make channel mapping array 0 terminated - -Also change pi_channels_src to be only AOUT_CHAN_MAX instead of same -size as mapping array. - -(cherry picked from commit 0ff86bf8a28a080340f600cb8561815fc43e3b4a) (rebased) -rebased: -- the code around is slightly different ---- - modules/codec/avcodec/audio.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c -index 20744010433b..04c540173bf9 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -585,6 +585,7 @@ static const uint64_t pi_channels_map[][2] = - { AV_CH_TOP_BACK_RIGHT, 0 }, - { AV_CH_STEREO_LEFT, 0 }, - { AV_CH_STEREO_RIGHT, 0 }, -+ { 0, 0 }, - }; - - static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) -@@ -617,8 +618,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) - } - #endif - -- const unsigned i_order_max = sizeof(pi_channels_map)/sizeof(*pi_channels_map); -- uint32_t pi_order_src[i_order_max]; -+ uint32_t pi_order_src[AOUT_CHAN_MAX] = { 0 }; - - int i_channels_src = 0, channel_count; - uint64_t channel_layout_mask; -@@ -637,7 +637,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) - - if( channel_layout_mask ) - { -- for( unsigned i = 0; i < i_order_max -+ for( unsigned i = 0; pi_channels_map[i][0] - && i_channels_src < channel_count; i++ ) - { - if( channel_layout_mask & pi_channels_map[i][0] ) --- -GitLab - - -From d1fb5c6cb372d2233046064db174daf1987c1211 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= -Date: Mon, 10 Jun 2024 11:10:37 +0700 -Subject: [PATCH 10/15] codec: avcodec: fix ch_layout requirement - -refs #28667 - -(cherry picked from commit 41778535dcae8b145ebfaa0392de281e470a91bf) (edited) -edited: -- on 3.0 the audio check was still using a LIBAVCODEC_VERSION_CHECK check -- the mux/demux checks were already there with different spaces ---- - modules/codec/avcodec/audio.c | 2 +- - modules/demux/avformat/demux.c | 2 +- - modules/demux/avformat/mux.c | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c -index 04c540173bf9..979256c400ad 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -142,7 +142,7 @@ static int OpenAudioCodec( decoder_t *p_dec ) - } - - ctx->sample_rate = p_dec->fmt_in.audio.i_rate; --#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) -+#if LIBAVUTIL_VERSION_CHECK(57, 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; -diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c -index 9975b0f47b67..c49f7eb4fc0e 100644 ---- a/modules/demux/avformat/demux.c -+++ b/modules/demux/avformat/demux.c -@@ -400,7 +400,7 @@ 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_CHECK( 59, 24, 100 ) -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) - es_fmt.audio.i_channels = cp->ch_layout.nb_channels; - #else - es_fmt.audio.i_channels = cp->channels; -diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c -index a48190c93ca0..090ed9f5bfa8 100644 ---- a/modules/demux/avformat/mux.c -+++ b/modules/demux/avformat/mux.c -@@ -273,7 +273,7 @@ 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_CHECK( 59, 24, 100 ) -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) - av_channel_layout_default( &codecpar->ch_layout, fmt->audio.i_channels ); - #else - codecpar->channels = fmt->audio.i_channels; --- -GitLab - - -From 0bcb306b7c05549a795b901ae33d6c7204456716 Mon Sep 17 00:00:00 2001 -From: Steve Lhomme -Date: Tue, 18 Jun 2024 15:34:10 +0200 -Subject: [PATCH 11/15] ffmpeg: fix libavutil version check for - av_channel_layout_default() - -It was added in c41899a3770cb4510e15b223fa34d129305b1589 which -was libavutil 57.23.100 at the time but the minor version was not updated in -that commit so we check 57.24.100. - -The same check applies for av_channel_layout_copy() added in the same commit. - -This is part of FFmpeg 5.1. - -https://github.com/FFmpeg/FFmpeg/commit/086a8048061bf9fb4c63943f6962db48175f655c -(cherry picked from commit 195f0c98599b55950c49a62f98d9d3495be310df) (rebased) -rebased: -- the code around is slightly different ---- - modules/codec/avcodec/encoder.c | 8 ++++---- - modules/demux/avformat/mux.c | 2 +- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c -index 2014b8afaf52..ec63c9c54397 100644 ---- a/modules/codec/avcodec/encoder.c -+++ b/modules/codec/avcodec/encoder.c -@@ -764,7 +764,7 @@ int InitVideoEnc( vlc_object_t *p_this ) - uint32_t order_mask = 0; - int i_channels_src = 0; - msg_Dbg( p_enc, "Creating channel order for reordering"); --# if LIBAVCODEC_VERSION_CHECK(59, 24, 100) -+# if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 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 -@@ -917,7 +917,7 @@ errmsg: - - if( p_enc->fmt_out.audio.i_channels > 2 ) - { --#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100) - av_channel_layout_default( &p_context->ch_layout, 2 ); - #else - p_context->channels = 2; -@@ -1281,7 +1281,7 @@ 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, 24, 100) -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 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; -@@ -1416,7 +1416,7 @@ 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, 24, 100) -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 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; -diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c -index 090ed9f5bfa8..bf65ca36716f 100644 ---- a/modules/demux/avformat/mux.c -+++ b/modules/demux/avformat/mux.c -@@ -273,7 +273,7 @@ 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_CHECK(59, 24, 100) -+#if LIBAVUTIL_VERSION_CHECK(57, 24, 100) - av_channel_layout_default( &codecpar->ch_layout, fmt->audio.i_channels ); - #else - codecpar->channels = fmt->audio.i_channels; --- -GitLab - - -From 38f9638ec71c2fe917dfd99ac2e1795b3357cfc3 Mon Sep 17 00:00:00 2001 -From: Steve Lhomme -Date: Tue, 18 Jun 2024 16:04:41 +0200 -Subject: [PATCH 12/15] ffmpeg: fix libavcodec version check for - AVCodecParameters.ch_layout -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It was added in 276c06726fbd2f784d51189870bd834e9284812f which -was libavcodec 59.23.100 at the time but the minor version was not updated in -that commit so we check 59.24.100. - -This is part of FFmpeg 5.1. - -It was erroneously removed in a55ec32ab3760d9edb6f05481cd3a981aa42878d. - -https://github.com/FFmpeg/FFmpeg/commit/276c06726fbd2f784d51189870bd834e9284812f - -Co-authored-by: François Cartegnie -(cherry picked from commit 597bdb8e0784101b5f412feba3309558ad5b8862) ---- - modules/demux/avformat/mux.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c -index bf65ca36716f..d8be5d1d9f53 100644 ---- a/modules/demux/avformat/mux.c -+++ b/modules/demux/avformat/mux.c -@@ -273,7 +273,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input ) - { - case AUDIO_ES: - codecpar->codec_type = AVMEDIA_TYPE_AUDIO; --#if LIBAVUTIL_VERSION_CHECK(57, 24, 100) -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100) - av_channel_layout_default( &codecpar->ch_layout, fmt->audio.i_channels ); - #else - codecpar->channels = fmt->audio.i_channels; --- -GitLab - - -From 0939d55b81e916ff303f92f301257c2e0885fdb9 Mon Sep 17 00:00:00 2001 -From: Steve Lhomme -Date: Wed, 19 Jun 2024 13:41:04 +0200 -Subject: [PATCH 13/15] avcodec: fix libavcodec version check for - AVCodecContext.ch_layout -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It was added in 548aeb93834b8425c86d1ce60fddc1d41805724d which -was libavcodec 59.23.100 at the time but the minor version was not updated in -that commit so we check 59.24.100. - -This is part of FFmpeg 5.1. - -https://github.com/FFmpeg/FFmpeg/commit/548aeb93834b8425c86d1ce60fddc1d41805724d - -Co-authored-by: François Cartegnie -(cherry picked from commit 8fd918b8787b8d077decf1a2b955ab0c7b964bf3) (rebased) -rebased: -- on 3.0 fmt_in is not a pointer ---- - modules/codec/avcodec/audio.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c -index 979256c400ad..fb22f0330053 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -142,7 +142,7 @@ static int OpenAudioCodec( decoder_t *p_dec ) - } - - ctx->sample_rate = p_dec->fmt_in.audio.i_rate; --#if LIBAVUTIL_VERSION_CHECK(57, 24, 100) -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 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; --- -GitLab - - -From e5072b340425e786b9e376cdf4bff4962c6e32f2 Mon Sep 17 00:00:00 2001 -From: Steve Lhomme -Date: Wed, 19 Jun 2024 08:36:40 +0200 -Subject: [PATCH 14/15] ffmpeg: fix libavutil version check for - AVFrame.ch_layout - -It was added in db6efa1815e217ed76f39aee8b15ee5c64698537 which -was libavutil 57.23.100 at the time but the minor version was not updated in -that commit so we check 57.24.100. - -This is part of FFmpeg 5.1. - -https://github.com/FFmpeg/FFmpeg/commit/db6efa1815e217ed76f39aee8b15ee5c64698537 -(cherry picked from commit f237155887f049f8befef2fdfadae7b60f697b0d) ---- - modules/codec/avcodec/audio.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c -index fb22f0330053..c27771aeb2e6 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -407,7 +407,7 @@ 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, 24, 100) -+#if LIBAVUTIL_VERSION_CHECK(57, 24, 100) - int channels = frame->ch_layout.nb_channels; - #else - int channels = ctx->channels; --- -GitLab - - -From 1713be552f9e26260a3ac33ce04ab89f660780cc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= -Date: Thu, 20 Jun 2024 13:12:37 +0200 -Subject: [PATCH 15/15] avcodec: add a define to test for - AVCodecContext.ch_layout availability - -Co-authored-by: Steve Lhomme -(cherry picked from commit 3abf93735df97cc2c96e11028b76067547c27eb7) (rebased) -rebased: -- on 3.0 the fmt_in is not a pointer -- the code around is slightly different due to the use of API_CHANNEL_LAYOUT ---- - modules/codec/avcodec/audio.c | 8 +++++--- - modules/codec/avcodec/encoder.c | 12 +++++++----- - 2 files changed, 12 insertions(+), 8 deletions(-) - -diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c -index c27771aeb2e6..b6186d6ec56d 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -41,6 +41,8 @@ - #include - #include - -+#define API_CHANNEL_LAYOUT_STRUCT (LIBAVCODEC_VERSION_CHECK(59, 24, 100)) // AVCodecContext.ch_layout -+ - #define API_CHANNEL_LAYOUT (LIBAV_UTIL_VERSION_CHECK( 52, 2, 6, 0, 100)) - - #if API_CHANNEL_LAYOUT -@@ -142,7 +144,7 @@ static int OpenAudioCodec( decoder_t *p_dec ) - } - - ctx->sample_rate = p_dec->fmt_in.audio.i_rate; --#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100) -+#if API_CHANNEL_LAYOUT_STRUCT && LIBAVUTIL_VERSION_CHECK(57, 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; -@@ -598,7 +600,7 @@ 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, 24, 100) -+#if API_CHANNEL_LAYOUT_STRUCT - 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; -@@ -622,7 +624,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) - - int i_channels_src = 0, channel_count; - uint64_t channel_layout_mask; --#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) -+#if API_CHANNEL_LAYOUT_STRUCT - 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 -diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c -index ec63c9c54397..b0d31269244c 100644 ---- a/modules/codec/avcodec/encoder.c -+++ b/modules/codec/avcodec/encoder.c -@@ -47,6 +47,8 @@ - #include "avcodec.h" - #include "avcommon.h" - -+#define API_CHANNEL_LAYOUT_STRUCT (LIBAVCODEC_VERSION_CHECK(59, 24, 100)) // AVCodecContext.ch_layout -+ - #define API_CHANNEL_LAYOUT (LIBAV_UTIL_VERSION_CHECK( 52, 2, 6, 0, 100)) - - #if API_CHANNEL_LAYOUT -@@ -182,7 +184,7 @@ static const uint64_t pi_channels_map[][2] = - { AV_CH_STEREO_RIGHT, 0 }, - }; - --# if !LIBAVCODEC_VERSION_CHECK(59, 24, 100) -+# if !API_CHANNEL_LAYOUT_STRUCT - static const uint32_t channel_mask[][2] = { - {0,0}, - {AOUT_CHAN_CENTER, AV_CH_LAYOUT_MONO}, -@@ -764,7 +766,7 @@ int InitVideoEnc( vlc_object_t *p_this ) - uint32_t order_mask = 0; - int i_channels_src = 0; - msg_Dbg( p_enc, "Creating channel order for reordering"); --# if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100) -+# if API_CHANNEL_LAYOUT_STRUCT && LIBAVUTIL_VERSION_CHECK(57, 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 -@@ -917,7 +919,7 @@ errmsg: - - if( p_enc->fmt_out.audio.i_channels > 2 ) - { --#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100) -+#if API_CHANNEL_LAYOUT_STRUCT && LIBAVUTIL_VERSION_CHECK(57, 24, 100) - av_channel_layout_default( &p_context->ch_layout, 2 ); - #else - p_context->channels = 2; -@@ -1281,7 +1283,7 @@ 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, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100) -+#if API_CHANNEL_LAYOUT_STRUCT && LIBAVUTIL_VERSION_CHECK(57, 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; -@@ -1416,7 +1418,7 @@ 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, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100) -+#if API_CHANNEL_LAYOUT_STRUCT && LIBAVUTIL_VERSION_CHECK(57, 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; --- -GitLab - diff --git a/6527.patch b/6527.patch deleted file mode 100644 index f483dc9..0000000 --- a/6527.patch +++ /dev/null @@ -1,46 +0,0 @@ -From a945944c2d50cacfacdd5b16d4ea5e7b4766a9fc Mon Sep 17 00:00:00 2001 -From: Steve Lhomme -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 -Co-authored-by: Thomas Guillem ---- - 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 - diff --git a/6606.patch b/6606.patch deleted file mode 100644 index b1cf6ed..0000000 --- a/6606.patch +++ /dev/null @@ -1,149 +0,0 @@ -From ba5dc03aecc1d96f81b76838f845ebde7348cf62 Mon Sep 17 00:00:00 2001 -From: David Rosca -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 - #endif - #include -+#if FF_API_STRUCT_VAAPI_CONTEXT - #include -+#else -+#include -+#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 - diff --git a/vlc-3.0.21.tar.xz b/vlc-3.0.21.tar.xz deleted file mode 100644 index 527e796..0000000 --- a/vlc-3.0.21.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:24dbbe1d7dfaeea0994d5def0bbde200177347136dbfe573f5b6a4cee25afbb0 -size 25649288 diff --git a/vlc-3.0.21.tar.xz.asc b/vlc-3.0.21.tar.xz.asc deleted file mode 100644 index 721800e..0000000 --- a/vlc-3.0.21.tar.xz.asc +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iF0EABECAB0WIQRl98a0IGvQV6frc3hxgHE75Y0a3AUCZmN15gAKCRBxgHE75Y0a -3PDaAKCGjcMhmC7+t5FwH2nVc1Cuy2dPeQCfe2/pEfZUpMPG2rfu/wO71uZ+vMo= -=Mt0w ------END PGP SIGNATURE----- diff --git a/vlc-3.0.22.tar.xz b/vlc-3.0.22.tar.xz new file mode 100644 index 0000000..7843674 --- /dev/null +++ b/vlc-3.0.22.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2cc1cf0ae0902a09da5a37c249a8a4e4b5ec4dc095443b8e1493c6a7cc138ea +size 26427084 diff --git a/vlc-3.0.22.tar.xz.asc b/vlc-3.0.22.tar.xz.asc new file mode 100644 index 0000000..2baec7f --- /dev/null +++ b/vlc-3.0.22.tar.xz.asc @@ -0,0 +1,6 @@ +-----BEGIN PGP SIGNATURE----- + +iF0EABECAB0WIQRl98a0IGvQV6frc3hxgHE75Y0a3AUCaSqlcgAKCRBxgHE75Y0a +3Gt9AJ0Rq/3drceujTTz90/gq04syCKKCgCg1FmMXocnXptoqV8pN3np0nQNneA= +=fSF0 +-----END PGP SIGNATURE----- diff --git a/vlc-taglib-2.0.patch b/vlc-taglib-2.0.patch deleted file mode 100644 index 34a4483..0000000 --- a/vlc-taglib-2.0.patch +++ /dev/null @@ -1,171 +0,0 @@ -From ec29dfca1e59530dd412d779e0b045079b72ffb6 Mon Sep 17 00:00:00 2001 -From: Vikram Kangotra -Date: Sat, 3 Feb 2024 02:52:52 +0530 -Subject: [PATCH] Taglib: Use ID3v2Tag() instead of tag() for RIFF::WAV::File - -`WriteMetaToId3v2` expects a `ID3v2::Tag` instead of `Tag`, but Since TagLib v2.0, -`RIFF::WAV::File::tag()` returns a `Tag` instead of `ID3v2::Tag`, hence replace -the usage of `tag()` method with `ID3v2Tag()`. - -https://github.com/taglib/taglib/blob/master/taglib/riff/wav/wavfile.h#L124 - -Additionally, to resolve the compilation error, the function signatures of -`insert` and `removeBlock` have been adjusted to align with the base class -functions. ---- - modules/meta_engine/taglib.cpp | 40 ++++++++++++++++++++++++++++++++++ - 1 file changed, 40 insertions(+) - -Index: vlc-3.0.20/modules/meta_engine/taglib.cpp -=================================================================== ---- vlc-3.0.20.orig/modules/meta_engine/taglib.cpp -+++ vlc-3.0.20/modules/meta_engine/taglib.cpp -@@ -125,7 +125,11 @@ VLCTagLib::ExtResolver::ExtResolver(c - template - File *VLCTagLib::ExtResolver::createFile(FileName fileName, bool, AudioProperties::ReadStyle) const - { -+#if defined(_WIN32) && TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ std::string filename = fileName.toString().to8Bit(true); -+#else - std::string filename = std::string(fileName); -+#endif - std::size_t namesize = filename.size(); - - if (namesize > ext.length()) -@@ -180,12 +184,16 @@ public: - return m_stream->psz_location; - } - -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ ByteVector readBlock(size_t length) -+#else - ByteVector readBlock(ulong length) -+#endif - { - ByteVector res(length, 0); - ssize_t i_read = vlc_stream_Read( m_stream, res.data(), length); - if (i_read < 0) -- return ByteVector::null; -+ return {}; - else if ((size_t)i_read != length) - res.resize(i_read); - return res; -@@ -196,11 +204,19 @@ public: - // Let's stay Read-Only for now - } - -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ void insert(const ByteVector&, offset_t, size_t) -+#else - void insert(const ByteVector&, ulong, ulong) -+#endif - { - } - -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ void removeBlock(offset_t, size_t) -+#else - void removeBlock(ulong, ulong) -+#endif - { - } - -@@ -214,7 +230,11 @@ public: - return true; - } - -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ void seek(offset_t offset, Position p) -+#else - void seek(long offset, Position p) -+#endif - { - uint64_t pos = 0; - switch (p) -@@ -237,12 +257,20 @@ public: - return; - } - -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ offset_t tell() const -+#else - long tell() const -+#endif - { - return m_previousPos; - } - -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ offset_t length() -+#else - long length() -+#endif - { - uint64_t i_size; - if (vlc_stream_GetSize( m_stream, &i_size ) != VLC_SUCCESS) -@@ -250,7 +278,11 @@ public: - return i_size; - } - -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ void truncate(offset_t) -+#else - void truncate(long) -+#endif - { - } - -@@ -465,7 +497,7 @@ static void ReadMetaFromASF( ASF::Tag* t - static void ReadMetaFromBasicTag(const Tag* tag, vlc_meta_t *dest) - { - #define SET( accessor, meta ) \ -- if( !tag->accessor().isNull() && !tag->accessor().isEmpty() ) \ -+ if( !tag->accessor().isEmpty() ) \ - vlc_meta_Set##meta( dest, tag->accessor().toCString(true) ) - #define SETINT( accessor, meta ) \ - if( tag->accessor() ) \ -@@ -806,15 +838,15 @@ static void ReadMetaFromMP4( MP4::Tag* t - { - MP4::Item list; - #define SET( keyName, metaName ) \ -- if( tag->itemListMap().contains(keyName) ) \ -+ if( tag->contains(keyName) ) \ - { \ -- list = tag->itemListMap()[keyName]; \ -+ list = tag->item(keyName); \ - vlc_meta_Set##metaName( p_meta, list.toStringList().front().toCString( true ) ); \ - } - #define SET_EXTRA( keyName, metaName ) \ -- if( tag->itemListMap().contains(keyName) ) \ -- { \ -- list = tag->itemListMap()[keyName]; \ -+ if( tag->contains(keyName) ) \ -+ { \ -+ list = tag->item(keyName); \ - vlc_meta_AddExtra( p_meta, metaName, list.toStringList().front().toCString( true ) ); \ - } - -@@ -824,9 +856,9 @@ static void ReadMetaFromMP4( MP4::Tag* t - #undef SET - #undef SET_EXTRA - -- if( tag->itemListMap().contains("covr") ) -+ if( tag->contains("covr") ) - { -- MP4::CoverArtList list = tag->itemListMap()["covr"].toCoverArtList(); -+ MP4::CoverArtList list = tag->item("covr").toCoverArtList(); - const char *psz_format = list[0].format() == MP4::CoverArt::PNG ? "image/png" : "image/jpeg"; - - msg_Dbg( p_demux_meta, "Found embedded art (%s) is %i bytes", -@@ -1337,7 +1369,11 @@ static int WriteMeta( vlc_object_t *p_th - if( RIFF::AIFF::File* riff_aiff = dynamic_cast(f.file()) ) - WriteMetaToId3v2( riff_aiff->tag(), p_item ); - else if( RIFF::WAV::File* riff_wav = dynamic_cast(f.file()) ) -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ WriteMetaToId3v2( riff_wav->ID3v2Tag(), p_item ); -+#else - WriteMetaToId3v2( riff_wav->tag(), p_item ); -+#endif - } - else if( TrueAudio::File* trueaudio = dynamic_cast(f.file()) ) - { diff --git a/vlc.changes b/vlc.changes index e6f7f37..b982e7a 100644 --- a/vlc.changes +++ b/vlc.changes @@ -1,3 +1,49 @@ +------------------------------------------------------------------- +Tue Dec 30 12:25:23 UTC 2025 - Dominique Leuenberger + +- Update to version 3.0.22: + + Core: Assume subpictures are in SDR by default + + Decoders: + * Fix Opus channel mapping + * Fix hardware decoding with VideoToolbox of XVID MPEG-4 video + * Add dav1d-all-layers option + * Fix DVD CEA-608 captions parsing + * Fix ProRes 4:4:4:4 + * Disable decoding using libdca, libmpeg2 and liba52 by default in favor of libavcodec + + Demuxers: + * Add support for DMX audio music (MUS) files + * Handle mkv-use-chapter-codec option + * Add A_ATRAC/AT1 support in matroska + * Prevent FLAC seeking logic get stuck + * Handle pictures in FLAC + * Fix VOB/AOB LPCM/MLP detection failing occasionally + * Cut QNap title on first invalid character + * Fix display of certain JPEG files + * Fix playback of very short ASF files (duration less than 1s) + * Multiple fixes in MPEG-TS + * Fix crashes in multiple demuxers (reported by rub.de, oss-fuzz and others) + + Input: Fix SFTP seeking for large files on 32-bit OS + + Interface: + * Qt: Add option to use dark palette + * Qt: Add compilation support for newer versions of Qt5 + * Qt: Fix scrolling on volume slider + * KDE: fix MPRIS state when started from file + + Service Discovery: UPnP: remove SAT>IP channel list fallback + + Video Output: + * Use a better stretch mode in wingdi + * Fetch missing device information when running in UWP + + Video Filter: + * Add AMD GPU Frame Rate Doubler (Direct3D11) + * Improve visualization of low frequencies in spectrogram +- Drop merged patches: + + 5574.patch + + 5590.patch + + 6168.patch + + 6273.patch + + 6527.patch + + 6606.patch + + vlc-taglib-2.0.patch + ------------------------------------------------------------------- Tue Oct 7 09:55:31 UTC 2025 - Bjørn Lie diff --git a/vlc.keyring b/vlc.keyring index d042dbe..9b9c05b 100644 --- a/vlc.keyring +++ b/vlc.keyring @@ -9,20 +9,259 @@ sgKqRn7W5SG5xoO0w/dmQj756ppjITGbxjFuhYE0X5S6NeMhUuFci7sJ42R7F1Ko 6sYuA/wOMUxCk4XOXeQF16ApyyenjE/UWbBNEhBmjEsZkYAFNc89pAEnEFSnIxK8 fcuCQioM6ojjaW+aEs/q3/klI0nat9LMLhNSCebjriMHwJDU70NeCn4nPWsfItT1 eKvbHNcX+3bq3D/i2Wa3PZ5YFFF01C61dHmVC9YGh4sAOXO09LQjVmlkZW9MQU4g -UmVsZWFzZSBTaWduaW5nIEtleSAoMjAxMymIaAQTEQIAKAIbAwYLCQgHAwIGFQgC -CQoLBBYCAwECHgECF4AFAlk3/bQFCQobbdAACgkQcYBxO+WNGtzKtgCgr8e+eznK -XeYnZYnSKz2pxvbetsQAn36gLn30dOINLPzDmWMc4lfIA2wGtCNWaWRlb0xBTiBS -ZWxlYXNlIFNpZ25pbmcgS2V5ICgyMDE0KYhpBBMRAgApAhsDBwsJCAcDAgEGFQgC -CQoLBBYCAwECHgECF4AFAlk3/bQFCQobbdAACgkQcYBxO+WNGty1xgCfci7vVRoG -FfDEccO417/OdsZ4l7MAnitkQtN+Lq+3rjgDZAWlNaF45i7TtCNWaWRlb0xBTiBS -ZWxlYXNlIFNpZ25pbmcgS2V5ICgyMDE1KYhqBBMRAgAqAhsDBQsJCAcCBhUICQoL -AgQWAgMBAh4BAheAAhkBBQJZN/20BQkKG23QAAoJEHGAcTvljRrcwscAn0CQBVCl -ArPMtbaybLn0TSsAehjkAKCQcHSfvkDxxYsY13x2Xk7ONqp2GbQjVmlkZW9MQU4g -UmVsZWFzZSBTaWduaW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lKWMq/AGXXwUCNaWYjFJM0+MlkiQIzBBABCAAdFiEERb6+ +7JUKvQXPDvXDUKBNDDtlF/IFAlsWHv4ACgkQUKBNDDtlF/Ih1Q//TRL6ycVjW6LV +6PJmOOX3ivt/UdO2iBZ8YiyzzsR3ehb23CCjVF5DFwT4etpPDbxxK4nD6Mz4KzCJ +QpQUNs/pT76vBrqGX0UsV1g6vVhmXV+muIFnHcQNvx7p6keb1ADeSWrgigS5kh15 +cbonuk0VnqN0uKPg30GGl3woa7hI3/BAUP5z0xDMD68szJdCPF6IdPcQsXAzD1yw +yQJinC5VkMnJ03Osb8ClQ4x+vD6xJimvCBJMHOx8llvEmoEWeJwCzrSkxDlZzjyi +OrxFmzmetqXbgHlwXJo9zW41r0SfwkUPhQUsxeLGOdl14hb2LpAvxS/BVzU7cdTh +dikX+6v0OLLVnNJUtDyEwUqdQZnVlQjgKJBYewZMO5wo2tMfuEY1lusgpN5R5jV4 +UM1BHeWJRyu7XI3Rg2lASekErdhzsYtw6CoGSsQ41Ku70EvZvLWU5VFUa7tJYARD +uJHOJH8MEPK4f4EyyoeM+Bsc/kE4IUkuHJPmlybuHq3erRYBPJLElbIMIBf3XsP3 +0sSNx2CxBrQ7j0f7PpPiKe54a+HoJ6AzjFVvEgtAW6w8RuiQ74b2kGIgnh5DApvU +1BtmDQBT/9SpttRJYGEMNED/leqbJKo+rJcDNi444To+cM596XIDn3fmVDsKe+1A +0vl51Cslc3kpaDKcZPNj+aGCXomVKCA= +=szNT -----END PGP PUBLIC KEY BLOCK----- diff --git a/vlc.spec b/vlc.spec index 9c5bb89..faf522c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -33,7 +33,7 @@ %define chromecast 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150600 Name: vlc -Version: 3.0.21 +Version: 3.0.22 Release: 0 Summary: Graphical media player License: GPL-2.0-or-later AND LGPL-2.1-or-later @@ -51,26 +51,11 @@ Patch2: vlc-lua-5.3.patch Patch4: fix-build-with-fdk-2.0.patch # PATCH-FIX-UPSTREAM -- Backport libplacebo v5 compatibility patch to vlc v3 Patch5: vlc-libplacebo-5.patch -# PATCH-FIX-UPSTREAM vlc-taglib-2.0.patch dimstar@opensuse.org -- Fix build against taglib 2.0 -Patch6: vlc-taglib-2.0.patch -# PATCH-FIX-UPSTREAM -Patch7: https://code.videolan.org/videolan/vlc/-/merge_requests/5590.patch # PATCH-FEATURE-OPENSUSE vlc-projectM-qt5.patch -- Build against projectM-qt5; openSUSE provides projectM as -qt and -qt5 variant Patch100: vlc-projectM-qt5.patch # PATCH-FIX-UPSTREAM -- Use OpenCV C++ API Patch103: 0001-Port-OpenCV-facedetect-example-to-C-API.patch -# PATCH-FIX-UPSTREAM -- add support for ffmpeg 7.0 (without VAAPI) -Patch111: https://code.videolan.org/videolan/vlc/-/merge_requests/5574.patch -# PATCH-FIX-UPSTREAM -- mux: avformat: fix avio callbacks signature with ffmpeg 6.1 -Patch112: https://code.videolan.org/videolan/vlc/-/merge_requests/6168.patch -# PATCH-FIX-UPSTREAM -- ffmpeg: backport more channel checks -Patch113: https://code.videolan.org/videolan/vlc/-/merge_requests/6273.patch -# PATCH-FIX-UPSTREAM -- avcodec: vaapi: support VAAPI with latest FFmpeg -Patch114: https://code.videolan.org/videolan/vlc/-/merge_requests/6606.patch -# PATCH-FIX-UPSTREAM -- nfs: fix libnfs API v2 support -Patch115: https://code.videolan.org/videolan/vlc/-/merge_requests/6527.patch - BuildRequires: Mesa-devel BuildRequires: aalib-devel BuildRequires: alsa-devel >= 1.0.24 @@ -400,19 +385,11 @@ default when `vlc` is invoked from an X session. %setup -q %patch -P 1 -p1 %patch -P 4 -p1 -%patch -P 6 -p1 -%patch -P 7 -p1 %if 0%{?suse_version} > 1320 && 0%{?suse_version} < 1550 && 0%{?sle_version} < 150200 %patch -P 100 -p1 %endif %patch -P 103 -p1 -%patch -P 111 -p1 -%patch -P 112 -p1 -%patch -P 113 -p1 -%patch -P 114 -p1 -%patch -P 115 -p1 - ### And LUA 5.3.1 has some more API changes if pkg-config --atleast-version 5.3.1 lua; then %patch -P 2 -p1 @@ -634,7 +611,7 @@ fi %if 0%{?suse_version} < 1500 %dir %{_datadir}/metainfo %endif -%{_datadir}/metainfo/%{name}.appdata.xml +%{_datadir}/metainfo/org.videolan.vlc.appdata.xml # The icon is the one referenced by the .desktop file %{_datadir}/pixmaps/vlc.png %{_datadir}/solid @@ -955,6 +932,7 @@ fi %{_libdir}/vlc/plugins/demux/libdemux_stl_plugin.so %{_libdir}/vlc/plugins/demux/libdiracsys_plugin.so %{_libdir}/vlc/plugins/demux/libdirectory_demux_plugin.so +%{_libdir}/vlc/plugins/demux/libdmxmus_plugin.so %{_libdir}/vlc/plugins/demux/libes_plugin.so %{_libdir}/vlc/plugins/demux/libflacsys_plugin.so %{_libdir}/vlc/plugins/demux/libgme_plugin.so -- 2.51.1 From e36e3cf3f235e1f4aa00d30165692edd04c25f5e6ceb08007c8f44013dae24a0 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 1 Jan 2026 14:00:18 +0000 Subject: [PATCH 6/7] Accepting request 1324890 from multimedia:libs OBS-URL: https://build.opensuse.org/request/show/1324890 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vlc?expand=0&rev=160 --- _service | 19 +++ vlc-3.0.22.tar.xz | 3 - vlc-3.0.22.tar.xz.asc | 6 - vlc-3.0.23.obscpio | 3 + vlc-libplacebo-5.patch | 132 -------------------- vlc.changes | 20 +++ vlc.keyring | 267 ----------------------------------------- vlc.obsinfo | 4 + vlc.spec | 73 ++++++----- 9 files changed, 86 insertions(+), 441 deletions(-) create mode 100644 _service delete mode 100644 vlc-3.0.22.tar.xz delete mode 100644 vlc-3.0.22.tar.xz.asc create mode 100644 vlc-3.0.23.obscpio delete mode 100644 vlc-libplacebo-5.patch delete mode 100644 vlc.keyring create mode 100644 vlc.obsinfo diff --git a/_service b/_service new file mode 100644 index 0000000..4b4b233 --- /dev/null +++ b/_service @@ -0,0 +1,19 @@ + + + + git + https://code.videolan.org/videolan/vlc.git + 3.0.x + @PARENT_TAG@+@TAG_OFFSET@ + v?([^+-]*)(-rc\d+)?(-[12])?(\+0)?(\+\d+)? + \1\5 + + + + + *.tar + zst + + + + diff --git a/vlc-3.0.22.tar.xz b/vlc-3.0.22.tar.xz deleted file mode 100644 index 7843674..0000000 --- a/vlc-3.0.22.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e2cc1cf0ae0902a09da5a37c249a8a4e4b5ec4dc095443b8e1493c6a7cc138ea -size 26427084 diff --git a/vlc-3.0.22.tar.xz.asc b/vlc-3.0.22.tar.xz.asc deleted file mode 100644 index 2baec7f..0000000 --- a/vlc-3.0.22.tar.xz.asc +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iF0EABECAB0WIQRl98a0IGvQV6frc3hxgHE75Y0a3AUCaSqlcgAKCRBxgHE75Y0a -3Gt9AJ0Rq/3drceujTTz90/gq04syCKKCgCg1FmMXocnXptoqV8pN3np0nQNneA= -=fSF0 ------END PGP SIGNATURE----- diff --git a/vlc-3.0.23.obscpio b/vlc-3.0.23.obscpio new file mode 100644 index 0000000..945b47d --- /dev/null +++ b/vlc-3.0.23.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b0023858f770cf33de4ff61c56dad824c66a2b6c1fc1ae96d4806fe0c0deccc +size 134004750 diff --git a/vlc-libplacebo-5.patch b/vlc-libplacebo-5.patch deleted file mode 100644 index 6f1cc5e..0000000 --- a/vlc-libplacebo-5.patch +++ /dev/null @@ -1,132 +0,0 @@ -From efbb1fdbc4420365b3ffd22e55dd27ad520037c7 Mon Sep 17 00:00:00 2001 -From: Niklas Haas -Date: Sat, 16 Jul 2022 14:41:13 +0200 -Subject: [PATCH] opengl: port to libplacebo v4 API - -These v3.x APIs will be removed in v5.x. Fortunately, the new APIs are a -near drop-in replacement, so the change was minimal. Only the error -handling was cleaned up slightly. ---- - modules/video_output/opengl/converter.h | 18 ++++++++++-------- - modules/video_output/opengl/fragment_shaders.c | 4 ++-- - modules/video_output/opengl/vout_helper.c | 14 +++++++------- - 3 files changed, 19 insertions(+), 17 deletions(-) - -diff --git a/modules/video_output/opengl/converter.h b/modules/video_output/opengl/converter.h -index 7000e1f38e..cb8e593a9a 100644 ---- a/modules/video_output/opengl/converter.h -+++ b/modules/video_output/opengl/converter.h -@@ -52,6 +52,11 @@ - # endif - #endif - -+#ifdef HAVE_LIBPLACEBO -+# include -+# include -+#endif -+ - #define VLCGL_PICTURE_MAX 128 - - #ifndef GL_TEXTURE_RECTANGLE -@@ -253,10 +258,6 @@ static inline bool HasExtension(const char *apis, const char *api) - return false; - } - --struct pl_context; --struct pl_shader; --struct pl_shader_res; -- - /* - * Structure that is filled by "glhw converter" module probe function - * The implementation should initialize every members of the struct that are -@@ -272,8 +273,12 @@ struct opengl_tex_converter_t - /* Pointer to object gl, set by the caller */ - vlc_gl_t *gl; - -+#ifdef HAVE_LIBPLACEBO - /* libplacebo context, created by the caller (optional) */ -- struct pl_context *pl_ctx; -+ pl_log pl_log; -+ pl_shader pl_sh; -+ const struct pl_shader_res *pl_sh_res; -+#endif - - /* Function pointers to OpenGL functions, set by the caller */ - const opengl_vtable_t *vt; -@@ -337,9 +342,6 @@ struct opengl_tex_converter_t - bool yuv_color; - GLfloat yuv_coefficients[16]; - -- struct pl_shader *pl_sh; -- const struct pl_shader_res *pl_sh_res; -- - /* Private context */ - void *priv; - -diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c -index 2246e33afd..16380335cc 100644 ---- a/modules/video_output/opengl/fragment_shaders.c -+++ b/modules/video_output/opengl/fragment_shaders.c -@@ -611,7 +611,7 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target, - - #ifdef HAVE_LIBPLACEBO - if (tc->pl_sh) { -- struct pl_shader *sh = tc->pl_sh; -+ pl_shader sh = tc->pl_sh; - struct pl_color_map_params color_params = pl_color_map_default_params; - color_params.intent = var_InheritInteger(tc->gl, "rendering-intent"); - color_params.tone_mapping_algo = var_InheritInteger(tc->gl, "tone-mapping"); -@@ -634,7 +634,7 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target, - pl_color_space_from_video_format(&tc->fmt), - dst_space, NULL, false); - -- struct pl_shader_obj *dither_state = NULL; -+ pl_shader_obj dither_state = NULL; - int method = var_InheritInteger(tc->gl, "dither-algo"); - if (method >= 0) { - -diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c -index 13d65e04c8..e971f5170b 100644 ---- a/modules/video_output/opengl/vout_helper.c -+++ b/modules/video_output/opengl/vout_helper.c -@@ -570,8 +570,8 @@ opengl_deinit_program(vout_display_opengl_t *vgl, struct prgm *prgm) - - #ifdef HAVE_LIBPLACEBO - FREENULL(tc->uloc.pl_vars); -- if (tc->pl_ctx) -- pl_context_destroy(&tc->pl_ctx); -+ pl_shader_free(&tc->pl_sh); -+ pl_log_destroy(&tc->pl_log); - #endif - - vlc_object_release(tc); -@@ -622,21 +622,21 @@ opengl_init_program(vout_display_opengl_t *vgl, struct prgm *prgm, - // create the main libplacebo context - if (!subpics) - { -- tc->pl_ctx = pl_context_create(PL_API_VER, &(struct pl_context_params) { -+ tc->pl_log = pl_log_create(PL_API_VER, &(struct pl_log_params) { - .log_cb = log_cb, - .log_priv = tc, - .log_level = PL_LOG_INFO, - }); -- if (tc->pl_ctx) { -+ if (tc->pl_log) { - # if PL_API_VER >= 20 -- tc->pl_sh = pl_shader_alloc(tc->pl_ctx, &(struct pl_shader_params) { -+ tc->pl_sh = pl_shader_alloc(tc->pl_log, &(struct pl_shader_params) { - .glsl.version = tc->glsl_version, - .glsl.gles = tc->is_gles, - }); - # elif PL_API_VER >= 6 -- tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0); -+ tc->pl_sh = pl_shader_alloc(tc->pl_log, NULL, 0); - # else -- tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0, 0); -+ tc->pl_sh = pl_shader_alloc(tc->pl_log, NULL, 0, 0); - # endif - } - } --- -2.38.1 - diff --git a/vlc.changes b/vlc.changes index b982e7a..01c2ffb 100644 --- a/vlc.changes +++ b/vlc.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Tue Dec 30 12:53:19 UTC 2025 - Dominique Leuenberger + +- Update to version 3.0.23: + + Codecs: + * Fix WebVTT line positioning + * Expose additional audio codec information (notably for Flac 24bit) + + Demuxers: + * fix some JPEG files wih JFIF headers + + Security: + * Fix null deref in libass, undefined shift in theora and cc-708, integer overflow in daala, + Infinite loop in h264 parsing, buffer overflow in png and multiple format-overflows + + Misc: + * Prepare compatibility for taglib 2.0, Qt6, FFmpeg8, mingw-w64 v13 and newer versions of + libplacebo and pupnp +- Drop vlc-libplacebo-5.patch: fixed upstream +- Convert to source service: 3.0.23 was only tagged, but no tarball + was published. +- Unpin ffmpeg-version: build against ffmpeg-8 + ------------------------------------------------------------------- Tue Dec 30 12:25:23 UTC 2025 - Dominique Leuenberger diff --git a/vlc.keyring b/vlc.keyring deleted file mode 100644 index 9b9c05b..0000000 --- a/vlc.keyring +++ /dev/null @@ -1,267 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQGiBFD9w2QRBACoEzH9KKirWE4wgiuPPynNnxks+p+t5i1z3CG+1XhagmTHoOf3 -v8i19kKHV6WnVMn2CKJFgwTTLYXOJTrBM/4ABVtu11cHeeueeo+pCSkdoLzYJ5QF -HbByB6j33QUbwKF0frEs+ge4LxzvYyCDAmNAW560QtOAR9Lk1Fo5B1GXzwCg1kDk -RkSe7EOZNm1U2rYAQ2VPrfsEAIHr4ooOyUByPR7XpoDOKoaXEG0hjpgh46lbgse+ -dQx8YrxS9vXQLwYokfWLrs55avx9Ys0iVv2TMv7X4Tn5sTVaK5K+NbKhxhLORxGI -sgKqRn7W5SG5xoO0w/d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OX3ivt/UdO2iBZ8YiyzzsR3ehb23CCjVF5DFwT4etpPDbxxK4nD6Mz4KzCJ -QpQUNs/pT76vBrqGX0UsV1g6vVhmXV+muIFnHcQNvx7p6keb1ADeSWrgigS5kh15 -cbonuk0VnqN0uKPg30GGl3woa7hI3/BAUP5z0xDMD68szJdCPF6IdPcQsXAzD1yw -yQJinC5VkMnJ03Osb8ClQ4x+vD6xJimvCBJMHOx8llvEmoEWeJwCzrSkxDlZzjyi -OrxFmzmetqXbgHlwXJo9zW41r0SfwkUPhQUsxeLGOdl14hb2LpAvxS/BVzU7cdTh -dikX+6v0OLLVnNJUtDyEwUqdQZnVlQjgKJBYewZMO5wo2tMfuEY1lusgpN5R5jV4 -UM1BHeWJRyu7XI3Rg2lASekErdhzsYtw6CoGSsQ41Ku70EvZvLWU5VFUa7tJYARD -uJHOJH8MEPK4f4EyyoeM+Bsc/kE4IUkuHJPmlybuHq3erRYBPJLElbIMIBf3XsP3 -0sSNx2CxBrQ7j0f7PpPiKe54a+HoJ6AzjFVvEgtAW6w8RuiQ74b2kGIgnh5DApvU -1BtmDQBT/9SpttRJYGEMNED/leqbJKo+rJcDNi444To+cM596XIDn3fmVDsKe+1A -0vl51Cslc3kpaDKcZPNj+aGCXomVKCA= -=szNT ------END PGP PUBLIC KEY BLOCK----- diff --git a/vlc.obsinfo b/vlc.obsinfo new file mode 100644 index 0000000..7c91883 --- /dev/null +++ b/vlc.obsinfo @@ -0,0 +1,4 @@ +name: vlc +version: 3.0.23 +mtime: 1766472938 +commit: 79128878ddb2c280bbb6c89c76a46b31a80ade1c diff --git a/vlc.spec b/vlc.spec index faf522c..199c262 100644 --- a/vlc.spec +++ b/vlc.spec @@ -27,30 +27,27 @@ %endif %bcond_without gstreamer %bcond_without fluidsynth +%bcond_with vdpau # VNC support - the module is not really usable in most cases tested so far (e.g. against qemu-kvm -vnc :xx) %bcond_with vnc %bcond_without faad %define chromecast 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150600 Name: vlc -Version: 3.0.22 +Version: 3.0.23 Release: 0 Summary: Graphical media player License: GPL-2.0-or-later AND LGPL-2.1-or-later Group: Productivity/Multimedia/Video/Players URL: http://www.videolan.org -Source: http://download.videolan.org/%{name}/%{version}/%{name}-%{version}.tar.xz +Source: %{name}-%{version}.tar.zst Source2: %{name}-rpmlintrc -Source98: http://download.videolan.org/%{name}/%{version}/%{name}-%{version}.tar.xz.asc -Source99: vlc.keyring # PATCH-FIX-UPSTREAM vlc-allow-deprecated-fribidi.patch dimstar@opensuse.org -- Allow usage of deprecated fribidi functions Patch1: vlc-allow-deprecated-fribidi.patch # PATCH-FIX-UPSTREAM vlc-lua-5.3.patch dimstar@opensuse.org -- Replace lua_optlong with lua_optinteger Patch2: vlc-lua-5.3.patch # PATCH-FIX-UPSTREAM fix-build-with-fdk-2.0.patch -- Fix building vlc with libfdk-aac v2 Patch4: fix-build-with-fdk-2.0.patch -# PATCH-FIX-UPSTREAM -- Backport libplacebo v5 compatibility patch to vlc v3 -Patch5: vlc-libplacebo-5.patch # PATCH-FEATURE-OPENSUSE vlc-projectM-qt5.patch -- Build against projectM-qt5; openSUSE provides projectM as -qt and -qt5 variant Patch100: vlc-projectM-qt5.patch # PATCH-FIX-UPSTREAM -- Use OpenCV C++ API @@ -60,15 +57,16 @@ BuildRequires: Mesa-devel BuildRequires: aalib-devel BuildRequires: alsa-devel >= 1.0.24 BuildRequires: avahi-devel >= 0.6 +BuildRequires: bison BuildRequires: dirac-devel BuildRequires: fdupes BuildRequires: findutils BuildRequires: flac-devel +BuildRequires: flex BuildRequires: freetype2 BuildRequires: fribidi-devel BuildRequires: gdk-pixbuf-devel BuildRequires: gettext-devel -#BuildRequires: git BuildRequires: gtk3-devel BuildRequires: libQt5Gui-private-headers-devel BuildRequires: libavc1394-devel >= 0.5.3 @@ -126,9 +124,9 @@ BuildRequires: pkgconfig(fdk-aac) BuildRequires: pkgconfig(gnutls) >= 3.2.0 BuildRequires: pkgconfig(libarchive) >= 3.1.0 BuildRequires: pkgconfig(libass) >= 0.9.8 -BuildRequires: pkgconfig(libavcodec) < 62 -BuildRequires: pkgconfig(libavformat) < 62 -BuildRequires: pkgconfig(libavutil) < 60 +BuildRequires: pkgconfig(libavcodec) +BuildRequires: pkgconfig(libavformat) +BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libbluray) >= 0.6.2 BuildRequires: pkgconfig(libgme) #BuildRequires: pkgconfig(libmodplug) >= 0.8.9 @@ -137,7 +135,6 @@ BuildRequires: pkgconfig(libmtp) >= 1.0.0 BuildRequires: pkgconfig(libnfs) %endif BuildRequires: pkgconfig(libnotify) -BuildRequires: pkgconfig(libpostproc) BuildRequires: pkgconfig(libpulse) >= 1.0 BuildRequires: pkgconfig(libsecret-1) >= 0.18 BuildRequires: pkgconfig(libswscale) @@ -151,7 +148,9 @@ BuildRequires: pkgconfig(soxr) BuildRequires: pkgconfig(speexdsp) BuildRequires: pkgconfig(taglib) >= 1.9 BuildRequires: pkgconfig(twolame) -# %dnl BuildRequires: pkgconfig(vdpau) >= 0.6 +%if %{with vdpau} +BuildRequires: pkgconfig(vdpau) >= 0.6 +%endif BuildRequires: pkgconfig(xcb) >= 1.6 BuildRequires: pkgconfig(xcb-composite) BuildRequires: pkgconfig(xcb-keysyms) >= 0.3.4 @@ -247,7 +246,9 @@ Group: Development/Libraries/C and C++ Requires: %{name} = %{version} Requires: %{name}-jack = %{version} Requires: %{name}-noX = %{version} -# %dnl Requires: %{name}-vdpau = %{version} +%if %{with vdpau} +Requires: %{name}-vdpau = %{version} +%endif %description devel These development headers are required if you plan on coding against VLC. @@ -395,13 +396,11 @@ if pkg-config --atleast-version 5.3.1 lua; then %patch -P 2 -p1 fi -if pkg-config --atleast-version 5 libplacebo; then -%patch -P 5 -p1 -fi - # We do not rely on contrib but make use of system libraries rm -rf contrib +[ ! -f src/revision.txt ] && echo "%version" > src/revision.txt + %build %global _lto_cflags %{?_lto_cflags} -ffat-lto-objects %if 0%{?suse_version} < 1500 @@ -447,7 +446,6 @@ autoreconf -fiv --disable-mod \ --enable-ogg \ --enable-optimizations \ - --enable-postproc \ --enable-pulse \ --enable-realrtsp \ --enable-sftp \ @@ -459,7 +457,11 @@ autoreconf -fiv --enable-twolame \ --enable-v4l2 \ --enable-vcd \ - --disable-vdpau \ +%if %{with vdpau} + --enable-vdpau \ +%else + --disable-vdpau \ +%endif --enable-vorbis \ --enable-xcb \ --enable-xvideo \ @@ -591,6 +593,7 @@ if [ -x %{_libdir}/vlc/vlc-cache-gen ]; then fi %endif +%if %{with vdpau} %post -n %{name}-vdpau if [ -x %{_libdir}/vlc/vlc-cache-gen ]; then %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins @@ -600,6 +603,7 @@ fi if [ -x %{_libdir}/vlc/vlc-cache-gen ]; then %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins fi +%endif %files %exclude %{_libdir}/vlc/libcompat.a @@ -1114,7 +1118,6 @@ fi %{_libdir}/vlc/plugins/video_filter/libmotiondetect_plugin.so %{_libdir}/vlc/plugins/video_filter/liboldmovie_plugin.so %{_libdir}/vlc/plugins/video_filter/libposterize_plugin.so -%{_libdir}/vlc/plugins/video_filter/libpostproc_plugin.so %{_libdir}/vlc/plugins/video_filter/libpsychedelic_plugin.so %{_libdir}/vlc/plugins/video_filter/libpuzzle_plugin.so %{_libdir}/vlc/plugins/video_filter/libripple_plugin.so @@ -1135,6 +1138,7 @@ fi %{_libdir}/vlc/plugins/video_output/libflaschen_plugin.so %{_libdir}/vlc/plugins/video_output/libglconv_vaapi_drm_plugin.so %{_libdir}/vlc/plugins/video_output/libglconv_vaapi_x11_plugin.so +%{_libdir}/vlc/plugins/vaapi/libvaapi_filters_plugin.so %{_libdir}/vlc/plugins/video_output/libgl_plugin.so %{_libdir}/vlc/plugins/video_output/libvdummy_plugin.so %{_libdir}/vlc/plugins/video_output/libvmem_plugin.so @@ -1142,7 +1146,6 @@ fi %{_libdir}/vlc/plugins/video_splitter/libclone_plugin.so %{_libdir}/vlc/plugins/video_splitter/libwall_plugin.so %{_libdir}/vlc/plugins/visualization/libvisual_plugin.so -%{_libdir}/vlc/plugins/vaapi/libvaapi_filters_plugin.so %ifarch %{arm} %dir %{_libdir}/vlc/plugins/arm_neon %{_libdir}/vlc/plugins/arm_neon/libchroma_yuv_neon_plugin.so @@ -1165,17 +1168,19 @@ fi %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so %endif -# %dnl files vdpau -# %dnl dir %{_libdir}/vlc/plugins/vdpau -# %dnl {_libdir}/vlc/libvlc_vdpau.so.0 -# %dnl {_libdir}/vlc/libvlc_vdpau.so.0.0.0 -# %dnl {_libdir}/vlc/plugins/vdpau/libvdpau_adjust_plugin.so -# %dnl {_libdir}/vlc/plugins/vdpau/libvdpau_avcodec_plugin.so -# %dnl {_libdir}/vlc/plugins/vdpau/libvdpau_chroma_plugin.so -# %dnl {_libdir}/vlc/plugins/vdpau/libvdpau_deinterlace_plugin.so -# %dnl {_libdir}/vlc/plugins/vdpau/libvdpau_display_plugin.so -# %dnl {_libdir}/vlc/plugins/vdpau/libvdpau_sharpen_plugin.so -# %dnl {_libdir}/vlc/plugins/video_output/libglconv_vdpau_plugin.so +%if %{with vdpau} +%files vdpau +%dir %{_libdir}/vlc/plugins/vdpau +%{_libdir}/vlc/libvlc_vdpau.so.0 +%{_libdir}/vlc/libvlc_vdpau.so.0.0.0 +%{_libdir}/vlc/plugins/vdpau/libvdpau_adjust_plugin.so +%{_libdir}/vlc/plugins/vdpau/libvdpau_avcodec_plugin.so +%{_libdir}/vlc/plugins/vdpau/libvdpau_chroma_plugin.so +%{_libdir}/vlc/plugins/vdpau/libvdpau_deinterlace_plugin.so +%{_libdir}/vlc/plugins/vdpau/libvdpau_display_plugin.so +%{_libdir}/vlc/plugins/vdpau/libvdpau_sharpen_plugin.so +%{_libdir}/vlc/plugins/video_output/libglconv_vdpau_plugin.so +%endif %files -n libvlc%{libvlc} %{_libdir}/libvlc.so.%{libvlc}* @@ -1195,7 +1200,9 @@ fi %{_libdir}/pkgconfig/libvlc.pc %{_libdir}/pkgconfig/vlc-plugin.pc %{_libdir}/vlc/libcompat.a -# %dnl {_libdir}/vlc/libvlc_vdpau.so +%if %{with vdpau} +%{_libdir}/vlc/libvlc_vdpau.so +%endif %if 0%{?BUILD_ORIG} %files codecs -- 2.51.1 From d235eba065632ae8e7424af16e4edd5655fc980441f5c174336cd022c9ab5080 Mon Sep 17 00:00:00 2001 From: Ana Guerrero Date: Thu, 22 Jan 2026 14:11:46 +0000 Subject: [PATCH 7/7] Accepting request 1328439 from multimedia:libs - Explicitly pass --disable-postproc to configure to not have a difference between ffmpeg-7 and ffmpeg-8 builds. - Change compression type of tarball to tar.xz: 3rd-party OBS instances build VLC also for older distros, which might not understand zstd compression. OBS-URL: https://build.opensuse.org/request/show/1328439 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vlc?expand=0&rev=161 --- _service | 2 +- vlc.changes | 13 +++++++++++++ vlc.spec | 5 +++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/_service b/_service index 4b4b233..85436a5 100644 --- a/_service +++ b/_service @@ -12,7 +12,7 @@ *.tar - zst + xz diff --git a/vlc.changes b/vlc.changes index 01c2ffb..154f859 100644 --- a/vlc.changes +++ b/vlc.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue Jan 20 16:36:15 UTC 2026 - Dominique Leuenberger + +- Explicitly pass --disable-postproc to configure to not have a + difference between ffmpeg-7 and ffmpeg-8 builds. + +------------------------------------------------------------------- +Thu Jan 15 07:21:00 UTC 2026 - Dominique Leuenberger + +- Change compression type of tarball to tar.xz: 3rd-party OBS + instances build VLC also for older distros, which might not + understand zstd compression. + ------------------------------------------------------------------- Tue Dec 30 12:53:19 UTC 2025 - Dominique Leuenberger diff --git a/vlc.spec b/vlc.spec index 199c262..528aad4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,7 +1,7 @@ # # spec file for package vlc # -# Copyright (c) 2025 SUSE LLC and contributors +# Copyright (c) 2026 SUSE LLC and contributors # Copyright (c) 2012 Dominique Leuenberger, Amsterdam, The Netherlands # # All modifications and additions to the file contributed by third parties @@ -40,7 +40,7 @@ Summary: Graphical media player License: GPL-2.0-or-later AND LGPL-2.1-or-later Group: Productivity/Multimedia/Video/Players URL: http://www.videolan.org -Source: %{name}-%{version}.tar.zst +Source: %{name}-%{version}.tar.xz Source2: %{name}-rpmlintrc # PATCH-FIX-UPSTREAM vlc-allow-deprecated-fribidi.patch dimstar@opensuse.org -- Allow usage of deprecated fribidi functions Patch1: vlc-allow-deprecated-fribidi.patch @@ -465,6 +465,7 @@ autoreconf -fiv --enable-vorbis \ --enable-xcb \ --enable-xvideo \ + --disable-postproc \ --with-default-font=%{_datadir}/fonts/truetype/FreeSerifBold.ttf \ --with-default-monospace-font=%{_datadir}/fonts/truetype/FreeMono.ttf \ %if %{with opengles} -- 2.51.1