From 1b04587eee33537fe862baf6fc6fc3937dccfdcc Mon Sep 17 00:00:00 2001 From: Mark Thompson Date: Mon, 19 Jun 2017 19:09:16 +0100 Subject: Move VADisplay allocation to common code This is slightly cleaner, and will be required to set common options on a newly-created display. Signed-off-by: Mark Thompson --- va/wayland/va_wayland.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'va/wayland') diff --git a/va/wayland/va_wayland.c b/va/wayland/va_wayland.c index 88a841f..f7ddfe8 100644 --- a/va/wayland/va_wayland.c +++ b/va/wayland/va_wayland.c @@ -32,6 +32,7 @@ #include "va_wayland_private.h" #include "va_backend.h" #include "va_backend_wayland.h" +#include "va_internal.h" static inline VADriverContextP get_driver_context(VADisplay dpy) @@ -120,11 +121,10 @@ vaGetDisplayWl(struct wl_display *display) struct VADriverVTableWayland *vtable; unsigned int i; - pDisplayContext = calloc(1, sizeof(*pDisplayContext)); + pDisplayContext = va_newDisplayContext(); if (!pDisplayContext) return NULL; - pDisplayContext->vadpy_magic = VA_DISPLAY_MAGIC; pDisplayContext->vaIsValid = va_DisplayContextIsValid; pDisplayContext->vaDestroy = va_DisplayContextDestroy; pDisplayContext->vaGetDriverName = va_DisplayContextGetDriverName; -- cgit v1.2.1