Download raw body.
freerdp fails on latest snapshot
On 06-11-2025 13:59, Kirill A. Korinsky wrote:
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/x11/freerdp/Makefile,v
> diff -u -p -r1.73 Makefile
> --- Makefile 21 May 2024 08:40:53 -0000 1.73
> +++ Makefile 6 Nov 2025 13:58:53 -0000
> @@ -1,5 +1,6 @@
> COMMENT = client for Microsoft RDP (remote desktop protocol)
> DISTNAME = freerdp-2.11.7
> +REVISION = 0
> DPB_PROPERTIES = parallel
> CATEGORIES = x11 net
>
> Index: patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c
> ===================================================================
> RCS file: patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c
> diff -N patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c 6 Nov 2025 13:58:53 -0000
> @@ -0,0 +1,22 @@
> +Index: channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
> +--- channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c.orig
> ++++ channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
> +@@ -624,11 +624,18 @@ static void tsmf_ffmpeg_free(ITSMFDecoder* decoder)
> +
> + if (mdecoder->codec_context)
> + {
> ++
> ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 69, 100)
> + if (mdecoder->prepared)
> + avcodec_close(mdecoder->codec_context);
> ++#endif
> +
> + free(mdecoder->codec_context->extradata);
> ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 69, 100)
> ++ avcodec_free_context(&mdecoder->codec_context);
> ++#else
> + av_free(mdecoder->codec_context);
> ++#endif
> + }
> +
> + free(decoder);
> Index: patches/patch-libfreerdp_codec_h264_ffmpeg_c
> ===================================================================
> RCS file: patches/patch-libfreerdp_codec_h264_ffmpeg_c
> diff -N patches/patch-libfreerdp_codec_h264_ffmpeg_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-libfreerdp_codec_h264_ffmpeg_c 6 Nov 2025 13:58:53 -0000
> @@ -0,0 +1,15 @@
> +Index: libfreerdp/codec/h264_ffmpeg.c
> +--- libfreerdp/codec/h264_ffmpeg.c.orig
> ++++ libfreerdp/codec/h264_ffmpeg.c
> +@@ -100,10 +100,10 @@ static void libavcodec_destroy_encoder(H264_CONTEXT* h
> +
> + if (sys->codecEncoderContext)
> + {
> +- avcodec_close(sys->codecEncoderContext);
> + #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 69, 100)
> + avcodec_free_context(&sys->codecEncoderContext);
> + #else
> ++ avcodec_close(sys->codecEncoderContext);
> + av_free(sys->codecEncoderContext);
> + #endif
> + }
Hi Kirill,
I'm not the op but I tried your patch and it failed with the following
against a Windows 11 machine:
[13:35:13:684] [85250:182a9e40] [ERROR][com.freerdp.core] -
transport_read_layer:freerdp_set_last_error_ex
ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
xfreerdp:/usr/local/lib/libfreerdp2.so.3.0: undefined symbol 'avcodec_close'
ld.so: xfreerdp: lazy binding failed!
Killed
But successfully connected to an Ubuntu machine running xrdp.
Cheers
Fred
freerdp fails on latest snapshot