On Wed, Dec 04, 2024 at 09:49:23AM +0000, Stuart Henderson wrote:
> Something, probably the x265 update, broke HandBrake?
> 
> /pobj/handbrake-1.6.1/HandBrake-1.6.1/libhb/encx265.c:444:20: warning: 
> comparison of array 'param->csvfn' equal to a n
> ull pointer is always false [-Wtautological-pointer-compare]
>         if (param->csvfn == NULL)
>             ~~~~~~~^~~~~    ~~~~
> /pobj/handbrake-1.6.1/HandBrake-1.6.1/libhb/encx265.c:447:26: error: array 
> type 'char[256]' is not assignable
>             param->csvfn = strdup(pv->csvfn);
>             ~~~~~~~~~~~~ ^
> 1 warning and 1 error generated.
 
Here is a diff to fix the build of HandBrake.


Index: Makefile
===================================================================
RCS file: /cvs/ports/multimedia/handbrake/Makefile,v
retrieving revision 1.25
diff -u -p -u -p -r1.25 Makefile
--- Makefile    24 Nov 2024 12:57:33 -0000      1.25
+++ Makefile    4 Dec 2024 15:55:21 -0000
@@ -3,7 +3,7 @@ COMMENT =       open source video transcoder
 V =            1.6.1
 DISTNAME =     HandBrake-${V}-source
 PKGNAME =      handbrake-${V}
-REVISION =     1
+REVISION =     2
 EXTRACT_SUFX = .tar.bz2
 CATEGORIES =   multimedia x11
 
@@ -64,7 +64,7 @@ LIB_DEPENDS = archivers/bzip2 \
                multimedia/libvpx \
                multimedia/svt-av1 \
                multimedia/x264 \
-               multimedia/x265 \
+               multimedia/x265>=4.1 \
                textproc/libxml \
                x11/gtk+3
 
Index: patches/patch-libhb_encx265_c
===================================================================
RCS file: patches/patch-libhb_encx265_c
diff -N patches/patch-libhb_encx265_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libhb_encx265_c       4 Dec 2024 15:55:21 -0000
@@ -0,0 +1,19 @@
+- contrib: update x265 to version 4.1 (#6430)
+  3e6479d666f76a5956bb5ce9a5d85ee8c925bbd3
+
+Index: libhb/encx265.c
+--- libhb/encx265.c.orig
++++ libhb/encx265.c
+@@ -441,10 +441,10 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job)
+     /* statsfile (but not 2-pass) */
+     if (param->logLevel >= X265_LOG_DEBUG)
+     {
+-        if (param->csvfn == NULL)
++        if (param->csvfn[0] == '\0')
+         {
+             pv->csvfn = hb_get_temporary_filename("x265.csv");
+-            param->csvfn = strdup(pv->csvfn);
++            snprintf(param->csvfn, X265_MAX_STRING_SIZE, "%s", pv->csvfn);
+         }
+         else
+         {

Reply via email to