Compare commits

...

10 Commits

Author SHA1 Message Date
Pete Walter 45f69ccd8a Rebuild for libvpx 1.14.x 2024-02-07 22:50:24 +00:00
Sandro Mani 774d42a007 Fix build with gcc14 (-Wint-conversion, -Wincompatible-pointer-types) 2024-01-31 15:30:24 +00:00
Dominik 'Rathann' Mierzejewski 67cc0fa210 Revert "Backport patch to fix -Wint-conversion for gcc-14"
This reverts commit b58631f030.

This change is not a complete fix. A complete fix is provided in
https://src.fedoraproject.org/rpms/ffmpeg/pull-request/23 . This
revert is necessary for the PR to be mergeable again.
2024-01-31 16:28:56 +01:00
Nicolas Chauvet b58631f030 Backport patch to fix -Wint-conversion for gcc-14
https://trac.ffmpeg.org/ticket/10833
2024-01-31 14:36:55 +01:00
Sandro Mani 1a68b30970 Rebuild (tesseract) 2024-01-28 11:32:35 +01:00
Fedora Release Engineering 5b76b46070 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 11:31:07 +00:00
Fedora Release Engineering 2fe1d67c6d Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 19:15:07 +00:00
Neal Gompa bea10e455b Add missing files for some of the libraries to fix riscv64 builds 2024-01-15 10:55:52 -05:00
Fabio Valentini e4f0babc79
Rebuild for dav1d 1.3.0 2024-01-12 18:18:42 +01:00
Florian Weimer b05e4ff557 Backport upstream patch to fix C compatibility issues
Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2024-01-05 15:48:35 +01:00
5 changed files with 234 additions and 2 deletions

67
ffmpeg-c99.patch Normal file
View File

@ -0,0 +1,67 @@
From 42982b5a5d461530a792e69b3e8abdd9d6d67052 Mon Sep 17 00:00:00 2001
From: Frank Plowman <post@frankplowman.com>
Date: Fri, 22 Dec 2023 12:00:01 +0000
Subject: [PATCH] avformat/ffrtmpcrypt: Fix int-conversion warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-type: text/plain
The gcrypt definition of `bn_new` used to use the return statement
on errors, with an AVERROR return value, regardless of the signature
of the function where the macro is used - it is called in
`dh_generate_key` and `ff_dh_init` which return pointers. As a result,
compiling with gcrypt and the ffrtmpcrypt protocol resulted in an
int-conversion warning. GCC 14 may upgrade these to errors [1].
This patch fixes the problem by changing the macro to remove `AVERROR`
and instead set `bn` to null if the allocation fails. This is the
behaviour of all the other `bn_new` implementations and so the result is
already checked at all the callsites. AFAICT, this should be the only
change needed to get ffmpeg off Fedora's naughty list of projects with
warnings which may be upgraded to errors in GCC 14 [2].
[1]: https://gcc.gnu.org/pipermail/gcc/2023-May/241264.html
[2]: https://www.mail-archive.com/devel@lists.fedoraproject.org/msg196024.html
Signed-off-by: Frank Plowman <post@frankplowman.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
---
libavformat/rtmpdh.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/libavformat/rtmpdh.c b/libavformat/rtmpdh.c
index 5ddae537a1..6a6c2ccd87 100644
--- a/libavformat/rtmpdh.c
+++ b/libavformat/rtmpdh.c
@@ -113,15 +113,18 @@ static int bn_modexp(FFBigNum bn, FFBigNum y, FFBigNum q, FFBigNum p)
return 0;
}
#elif CONFIG_GCRYPT
-#define bn_new(bn) \
- do { \
- if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \
- if (!gcry_check_version("1.5.4")) \
- return AVERROR(EINVAL); \
- gcry_control(GCRYCTL_DISABLE_SECMEM, 0); \
- gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); \
- } \
- bn = gcry_mpi_new(1); \
+#define bn_new(bn) \
+ do { \
+ if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \
+ if (gcry_check_version("1.5.4")) { \
+ gcry_control(GCRYCTL_DISABLE_SECMEM, 0); \
+ gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); \
+ } \
+ } \
+ if (gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) \
+ bn = gcry_mpi_new(1); \
+ else \
+ bn = NULL; \
} while (0)
#define bn_free(bn) gcry_mpi_release(bn)
#define bn_set_word(bn, w) gcry_mpi_set_ui(bn, w)
--
2.43.0

131
ffmpeg-gcc14.patch Normal file
View File

@ -0,0 +1,131 @@
From 68ef9a29478fad450ec29ec14120afad3938e75b Mon Sep 17 00:00:00 2001
From: Sandro Mani <manisandro@gmail.com>
Date: Tue, 30 Jan 2024 09:16:13 +0100
Subject: [PATCH] Fix -Wint-conversion and -Wincompatible-pointer-types errors
---
libavcodec/pcm-bluray.c | 4 ++--
libavcodec/pcm-dvd.c | 2 +-
libavcodec/vulkan_av1.c | 2 +-
libavcodec/vulkan_decode.c | 6 +++---
libavcodec/vulkan_video.c | 2 +-
libavfilter/vsrc_testsrc_vulkan.c | 4 ++--
libavutil/hwcontext_vaapi.c | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/libavcodec/pcm-bluray.c b/libavcodec/pcm-bluray.c
index f656095..56fa373 100644
--- a/libavcodec/pcm-bluray.c
+++ b/libavcodec/pcm-bluray.c
@@ -167,7 +167,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, AVFrame *frame,
samples *= num_source_channels;
if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
#if HAVE_BIGENDIAN
- bytestream2_get_buffer(&gb, dst16, buf_size);
+ bytestream2_get_buffer(&gb, (uint8_t*)dst16, buf_size);
#else
do {
*dst16++ = bytestream2_get_be16u(&gb);
@@ -187,7 +187,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, AVFrame *frame,
if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
do {
#if HAVE_BIGENDIAN
- bytestream2_get_buffer(&gb, dst16, avctx->ch_layout.nb_channels * 2);
+ bytestream2_get_buffer(&gb, (uint8_t*)dst16, avctx->ch_layout.nb_channels * 2);
dst16 += avctx->ch_layout.nb_channels;
#else
channel = avctx->ch_layout.nb_channels;
diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c
index 419b2a1..319746c 100644
--- a/libavcodec/pcm-dvd.c
+++ b/libavcodec/pcm-dvd.c
@@ -157,7 +157,7 @@ static void *pcm_dvd_decode_samples(AVCodecContext *avctx, const uint8_t *src,
switch (avctx->bits_per_coded_sample) {
case 16: {
#if HAVE_BIGENDIAN
- bytestream2_get_buffer(&gb, dst16, blocks * s->block_size);
+ bytestream2_get_buffer(&gb, (uint8_t*)dst16, blocks * s->block_size);
dst16 += blocks * s->block_size / 2;
#else
int samples = blocks * avctx->ch_layout.nb_channels;
diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c
index 4998bf7..9730e4b 100644
--- a/libavcodec/vulkan_av1.c
+++ b/libavcodec/vulkan_av1.c
@@ -180,7 +180,7 @@ static int vk_av1_create_params(AVCodecContext *avctx, AVBufferRef **buf)
.sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
.pNext = &av1_params,
.videoSession = ctx->common.session,
- .videoSessionParametersTemplate = NULL,
+ .videoSessionParametersTemplate = VK_NULL_HANDLE,
};
err = ff_vk_decode_create_params(buf, avctx, ctx, &session_params_create);
diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
index a89d84f..fdbcbb4 100644
--- a/libavcodec/vulkan_decode.c
+++ b/libavcodec/vulkan_decode.c
@@ -188,9 +188,9 @@ int ff_vk_decode_prepare_frame(FFVulkanDecodeContext *dec, AVFrame *pic,
return 0;
vkpic->dpb_frame = NULL;
- vkpic->img_view_ref = NULL;
- vkpic->img_view_out = NULL;
- vkpic->img_view_dest = NULL;
+ vkpic->img_view_ref = VK_NULL_HANDLE;
+ vkpic->img_view_out = VK_NULL_HANDLE;
+ vkpic->img_view_dest = VK_NULL_HANDLE;
vkpic->destroy_image_view = vk->DestroyImageView;
vkpic->wait_semaphores = vk->WaitSemaphores;
diff --git a/libavcodec/vulkan_video.c b/libavcodec/vulkan_video.c
index 236aa12..c5144bd 100644
--- a/libavcodec/vulkan_video.c
+++ b/libavcodec/vulkan_video.c
@@ -287,7 +287,7 @@ av_cold void ff_vk_video_common_uninit(FFVulkanContext *s,
if (common->session) {
vk->DestroyVideoSessionKHR(s->hwctx->act_dev, common->session,
s->hwctx->alloc);
- common->session = NULL;
+ common->session = VK_NULL_HANDLE;
}
if (common->nb_mem && common->mem)
diff --git a/libavfilter/vsrc_testsrc_vulkan.c b/libavfilter/vsrc_testsrc_vulkan.c
index 8761c21..1720bfa 100644
--- a/libavfilter/vsrc_testsrc_vulkan.c
+++ b/libavfilter/vsrc_testsrc_vulkan.c
@@ -231,7 +231,7 @@ static int testsrc_vulkan_activate(AVFilterContext *ctx)
return AVERROR(ENOMEM);
err = ff_vk_filter_process_simple(&s->vkctx, &s->e, &s->pl, s->picref, NULL,
- NULL, &s->opts, sizeof(s->opts));
+ VK_NULL_HANDLE, &s->opts, sizeof(s->opts));
if (err < 0)
return err;
}
@@ -250,7 +250,7 @@ static int testsrc_vulkan_activate(AVFilterContext *ctx)
frame->sample_aspect_ratio = s->sar;
if (!s->draw_once) {
err = ff_vk_filter_process_simple(&s->vkctx, &s->e, &s->pl, frame, NULL,
- NULL, &s->opts, sizeof(s->opts));
+ VK_NULL_HANDLE, &s->opts, sizeof(s->opts));
if (err < 0) {
av_frame_free(&frame);
return err;
diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index 12bc951..d326ad6 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -1203,7 +1203,7 @@ static int vaapi_map_from_drm(AVHWFramesContext *src_fc, AVFrame *dst,
if (!use_prime2 || vas != VA_STATUS_SUCCESS) {
int k;
- unsigned long buffer_handle;
+ size_t buffer_handle;
VASurfaceAttribExternalBuffers buffer_desc;
VASurfaceAttrib buffer_attrs[2] = {
{
--
2.43.0

View File

@ -92,7 +92,7 @@ Name: ffmpeg
%global pkg_name %{name}%{?pkg_suffix}
Version: 6.1.1
Release: 1%{?dist}
Release: 8%{?dist}
Summary: A complete solution to record, convert and stream audio and video
License: GPL-3.0-or-later
URL: https://ffmpeg.org/
@ -119,6 +119,9 @@ Patch2: ffmpeg-allow-fdk-aac-free.patch
# Drop openh264 runtime version checks
# https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=10211
Patch4: 0001-lavc-libopenh264-Drop-openh264-runtime-version-check.patch
Patch5: ffmpeg-c99.patch
# Fix build with gcc14 (-Wint-conversion, -Wincompatible-pointer-types)
Patch6: ffmpeg-gcc14.patch
# Set up dlopen for openh264
Patch1001: ffmpeg-dlopen-openh264.patch
@ -860,6 +863,27 @@ rm -rf %{buildroot}%{_datadir}/%{name}/examples
%{_mandir}/man3/libswscale.3*
%changelog
* Wed Feb 07 2024 Pete Walter <pwalter@fedoraproject.org> - 6.1.1-8
- Rebuild for libvpx 1.14.x
* Sun Jan 28 2024 Sandro Mani <manisandro@gmail.com> - 6.1.1-7
- Rebuild (tesseract)
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 15 2024 Neal Gompa <ngompa@fedoraproject.org> - 6.1.1-4
- Add missing files for some of the libraries to fix riscv64 builds
* Fri Jan 12 2024 Fabio Valentini <decathorpe@gmail.com> - 6.1.1-3
- Rebuild for dav1d 1.3.0
* Fri Jan 05 2024 Florian Weimer <fweimer@redhat.com> - 6.1.1-2
- Backport upstream patch to fix C compatibility issues
* Thu Jan 04 2024 Neal Gompa <ngompa@fedoraproject.org> - 6.1.1-1
- Update to 6.1.1

View File

@ -3479,11 +3479,13 @@ libavutil/arm/cpu.c
libavutil/arm/cpu.h
libavutil/arm/float_dsp_arm.h
libavutil/arm/float_dsp_init_arm.c
libavutil/arm/float_dsp_init_neon.c
libavutil/arm/float_dsp_init_vfp.c
libavutil/arm/float_dsp_neon.S
libavutil/arm/float_dsp_vfp.S
libavutil/arm/intmath.h
libavutil/arm/intreadwrite.h
libavutil/arm/neontest.h
libavutil/arm/timer.h
libavutil/attributes.h
libavutil/attributes_internal.h
@ -3670,6 +3672,7 @@ libavutil/ripemd.h
libavutil/riscv/Makefile
libavutil/riscv/asm.S
libavutil/riscv/bswap.h
libavutil/riscv/bswap_rvb.S
libavutil/riscv/cpu.c
libavutil/riscv/cpu.h
libavutil/riscv/fixed_dsp_init.c
@ -3755,6 +3758,7 @@ libavutil/x86/pixelutils_init.c
libavutil/x86/timer.h
libavutil/x86/tx_float.asm
libavutil/x86/tx_float_init.c
libavutil/x86/w64xmmtest.h
libavutil/x86/x86inc.asm
libavutil/x86/x86util.asm
libavutil/xga_font_data.c
@ -3775,11 +3779,13 @@ libswresample/Makefile
libswresample/aarch64/Makefile
libswresample/aarch64/audio_convert_init.c
libswresample/aarch64/audio_convert_neon.S
libswresample/aarch64/neontest.c
libswresample/aarch64/resample.S
libswresample/aarch64/resample_init.c
libswresample/arm/Makefile
libswresample/arm/audio_convert_init.c
libswresample/arm/audio_convert_neon.S
libswresample/arm/neontest.c
libswresample/arm/resample.S
libswresample/arm/resample_init.c
libswresample/audioconvert.c
@ -3811,6 +3817,7 @@ libswresample/x86/rematrix.asm
libswresample/x86/rematrix_init.c
libswresample/x86/resample.asm
libswresample/x86/resample_init.c
libswresample/x86/w64xmmtest.c
libswscale/Makefile
libswscale/aarch64/Makefile
libswscale/aarch64/hscale.S
@ -3826,6 +3833,7 @@ libswscale/arm/hscale.S
libswscale/arm/output.S
libswscale/arm/rgb2yuv_neon_16.S
libswscale/arm/rgb2yuv_neon_32.S
libswscale/arm/rgb2yuv_neon_common.S
libswscale/arm/swscale.c
libswscale/arm/swscale_unscaled.c
libswscale/arm/yuv2rgb_neon.S
@ -3851,6 +3859,7 @@ libswscale/rgb2rgb.h
libswscale/rgb2rgb_template.c
libswscale/riscv/Makefile
libswscale/riscv/rgb2rgb.c
libswscale/riscv/rgb2rgb_rvb.S
libswscale/riscv/rgb2rgb_rvv.S
libswscale/slice.c
libswscale/swscale.c
@ -3873,6 +3882,7 @@ libswscale/x86/scale.asm
libswscale/x86/scale_avx2.asm
libswscale/x86/swscale.c
libswscale/x86/swscale_template.c
libswscale/x86/w64xmmtest.c
libswscale/x86/yuv2rgb.c
libswscale/x86/yuv2rgb_template.c
libswscale/x86/yuv2yuvX.asm

View File

@ -1,4 +1,4 @@
SHA512 (ffmpeg-free-6.1.1.tar.xz) = 4fdecf8316bc038839a1d05116630f47e4d75d3b25fa6b3480f9e654d5677c7996c6a2a83f93f4520e175a79843da05a987aeda24c9a6e7495079a808309569b
SHA512 (ffmpeg-free-6.1.1.tar.xz) = f7ca7901b7affa45fd6016b7ac2d7f843f89ad7f813c6f37228d184842aa55167429585e172d3da61ca1ef64818d563199faa7d06295eea1fd829696d28fa044
SHA512 (ffmpeg-6.1.1.tar.xz.asc) = 0e10c1f560bab0812d759d286656593dea5940f02bb52d88d9ba7f10b12b9cc3d7aa2a41c5f7a45b319069e04dce22dc1286b3c1ba685b35cd6d04cd81c5a0f5
SHA512 (ffmpeg-dlopen-headers.tar.xz) = 97e6986fc2bb9dfa4516135a76b04d27ceb52ff96f0af21a6169919aeefefb4d2e2e24a771959689cdbec385f5d71614ba661223c67c0e94089a6dd823a30099
SHA512 (ffmpeg.keyring) = 9b36506835db36f776b7ddb53ad6fa9e915e6ca2f9c7cfebe8eb45513e1036a985283590a840ca313a111bf35dc3731f68885aaafb1fb7011ec433cc119e5165