VLC fails to build with x265-4.0
Hey folks! While working on upgrading Beyond Linux From Scratch to x265-4.0, we're encountering a build failure in VLC.
codec/x265.c: In function ‘Encode’:
codec/x265.c:92:43: error: passing argument 5 of ‘x265_encoder_encode’ from incompatible pointer type [-Wincompatible-pointer-types]
92 | likely(p_pict) ? &pic : NULL, &pic);
| ^~~~
| |
| x265_picture *
In file included from codec/x265.c:37:
/usr/include/x265.h:2496:122: note: expected ‘x265_picture **’ but argument is of type ‘x265_picture *’
2496 | int x265_encoder_encode(x265_encoder *encoder, x265_nal **pp_nal, uint32_t *pi_nal, x265_picture *pic_in, x265_picture **pic_out);
| ~~~~~~~~~~~~~~~^~~~~~~
make[4]: *** [Makefile:24579: codec/libx265_plugin_la-x265.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
This is VLC 3.0.21 with GCC 14.2.0. The build issue is related to the API changes described at https://mailman.videolan.org/pipermail/x265-devel/2024-September/013945.html
Note that if you build this with a previous version of GCC (such as GCC 13), VLC will build correctly, but crash at runtime.