commit: b9a5c14208516adf45c689a197ce6e18188f1ae7 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Oct 21 03:29:01 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Oct 21 03:29:01 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9a5c142
media-libs/avidemux-plugins: fix build w/ x265-4.1 Closes: https://bugs.gentoo.org/964704 Signed-off-by: Sam James <sam <AT> gentoo.org> .../avidemux-plugins-2.8.1-r3.ebuild | 5 ++- .../files/avidemux-plugins-2.8.1-x265-4.1.patch | 48 ++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/media-libs/avidemux-plugins/avidemux-plugins-2.8.1-r3.ebuild b/media-libs/avidemux-plugins/avidemux-plugins-2.8.1-r3.ebuild index 443fb8a9c1c3..d15d0657edcf 100644 --- a/media-libs/avidemux-plugins/avidemux-plugins-2.8.1-r3.ebuild +++ b/media-libs/avidemux-plugins/avidemux-plugins-2.8.1-r3.ebuild @@ -83,7 +83,10 @@ RDEPEND=" S="${WORKDIR}/avidemux2-${PV}" -PATCHES=( "${FILESDIR}/${PN}-2.8.1-optional-pulse.patch" ) +PATCHES=( + "${FILESDIR}/${PN}-2.8.1-optional-pulse.patch" + "${FILESDIR}/${PN}-2.8.1-x265-4.1.patch" +) src_prepare() { default diff --git a/media-libs/avidemux-plugins/files/avidemux-plugins-2.8.1-x265-4.1.patch b/media-libs/avidemux-plugins/files/avidemux-plugins-2.8.1-x265-4.1.patch new file mode 100644 index 000000000000..9803cd14985a --- /dev/null +++ b/media-libs/avidemux-plugins/files/avidemux-plugins-2.8.1-x265-4.1.patch @@ -0,0 +1,48 @@ +https://bugs.gentoo.org/964704 +https://github.com/mean00/avidemux2/commit/c16d32a67cdb012db093472ad3776713939a30d1.patch + +From c16d32a67cdb012db093472ad3776713939a30d1 Mon Sep 17 00:00:00 2001 +From: eumagga0x2a <[email protected]> +Date: Sat, 4 Jan 2025 23:34:14 +0100 +Subject: [PATCH] [x265] Fix build with x265 4.1 + +--- + .../ADM_videoEncoder/x265/ADM_x265Setup.cpp | 19 ++++++++++++++++++- + 1 file changed, 18 insertions(+), 1 deletion(-) + +diff --git a/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265Setup.cpp b/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265Setup.cpp +index 55816a713..0bc330b6e 100644 +--- a/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265Setup.cpp ++++ b/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265Setup.cpp +@@ -216,13 +216,30 @@ bool x265Encoder::setup(void) + { + param.rc.bStatWrite=1; + param.rc.bStatRead=0; ++#if X265_BUILD > 213 ++ if (strlen(logFile) >= X265_MAX_STRING_SIZE) ++ { ++ ADM_error("Logfile filename length %d out of bounds, must be less than %d\n", strlen(logFile), X265_MAX_STRING_SIZE); ++ return false; ++ } ++ snprintf(param.rc.statFileName, X265_MAX_STRING_SIZE, "%s", logFile); ++#else + param.rc.statFileName=strdup(logFile); +- ++#endif + }else + { + param.rc.bStatWrite=0; + param.rc.bStatRead=1; ++#if X265_BUILD > 213 ++ if (strlen(logFile) >= X265_MAX_STRING_SIZE) ++ { ++ ADM_error("Logfile filename length %d out of bounds, must be less than %d\n", strlen(logFile), X265_MAX_STRING_SIZE); ++ return false; ++ } ++ snprintf(param.rc.statFileName, X265_MAX_STRING_SIZE, "%s", logFile); ++#else + param.rc.statFileName=strdup(logFile); ++#endif + if(!ADM_fileExist(logFile)) + { + ADM_error("Logfile %s does not exist \n",logFile);
