[vlc-devel] [PATCH 3/3] libplacebo: add forward compatibility with libplacebo v4+

Niklas Haas vlc at haasn.xyz
Mon Oct 4 04:46:43 UTC 2021

From: Niklas Haas <git at haasn.dev>

Current libplacebo git master has dropped fields deprecated in
libplacebo v2, but we remain backwards compatible with libplacebo v2 due
to reasons of debian stable / ubuntu LTS.

Rather than bumping up to libplacebo v3 (which would allow us to drop
these deprecated functions entirely), simply add forward compatibility
defines for now. Can be removed whenever there's a new ubuntu/debian
 modules/video_output/libplacebo/display.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/modules/video_output/libplacebo/display.c b/modules/video_output/libplacebo/display.c
index ff4de917e3..b4de3d5895 100644
--- a/modules/video_output/libplacebo/display.c
+++ b/modules/video_output/libplacebo/display.c
@@ -43,6 +43,15 @@
 # include <libplacebo/shaders/lut.h>
+#if PL_API_VER >= 159
+// Forward compatibility with libplacebo v4+
+#define pl_image pl_frame
+#define pl_render_target pl_frame
+#define pl_render_target_from_swapchain pl_frame_from_swapchain
+#define src_rect crop
+#define dst_rect crop
 typedef struct vout_display_sys_t
     vlc_placebo_t *pl;

More information about the vlc-devel mailing list