Files
buildroot/package/freerdp/0006-fix-ffmpeg-deprecation-warning.patch
Bernd Kuhls 5cb9002e81 package/freerdp: fix build with ffmpeg 8.0
Added four upstream patches backported from FreeRDP 3.x.

The remaining build error:

/home/bernd/buildroot/output/build/freerdp-2.11.7-18-g0ee17e2f8e49d56ab5b90d5160fa8f87ffc445e0/
 channels/client/tables.c:129:22:
 error: initialization of ‘UINT (*)(void)’ {aka ‘unsigned int (*)(void)’}
 from incompatible pointer type ‘UINT (*)(void *)’ {aka ‘unsigned int (*)(void *)’}
 [-Wincompatible-pointer-types]
  129 |         { "oss", "", oss_freerdp_rdpsnd_client_subsystem_entry },

is fixed by adding -Wno-incompatible-pointer-types to CFLAGS due to
tables.c being dynamically created during the build and backporting the
supposed upstream fix
fe6d861a5c
is too invasive.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2026-02-03 08:46:44 +01:00

35 lines
1.1 KiB
Diff

From 83ba6817093ad1546053878c2e720d13f29f9126 Mon Sep 17 00:00:00 2001
From: Armin Novak <anovak@thincast.com>
Date: Fri, 24 Nov 2023 19:40:52 +0100
Subject: [PATCH] fix ffmpeg deprecation warning
Upstream: https://github.com/FreeRDP/FreeRDP/commit/1ef7b9e3e06ef69e5145c6f11cc330078abaa9ea
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
libfreerdp/codec/dsp_ffmpeg.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/libfreerdp/codec/dsp_ffmpeg.c b/libfreerdp/codec/dsp_ffmpeg.c
index 22d6ce215..5c89af6b1 100644
--- a/libfreerdp/codec/dsp_ffmpeg.c
+++ b/libfreerdp/codec/dsp_ffmpeg.c
@@ -436,7 +436,13 @@ static BOOL ffmpeg_encode_frame(AVCodecContext* context, AVFrame* in, AVPacket*
if (in->format == AV_SAMPLE_FMT_FLTP)
{
uint8_t** pp = in->extended_data;
- for (int y = 0; y < in->channels; y++)
+#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57, 28, 100)
+ const int nr_channels = in->channels;
+#else
+ const int nr_channels = in->ch_layout.nb_channels;
+#endif
+
+ for (int y = 0; y < nr_channels; y++)
{
float* data = (float*)pp[y];
for (int x = 0; x < in->nb_samples; x++)
--
2.47.3