summaryrefslogtreecommitdiff
path: root/va/wayland
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-06-19 19:09:16 +0100
committerXiang, Haihao <haihao.xiang@intel.com>2017-09-27 12:48:16 +0800
commit1b04587eee33537fe862baf6fc6fc3937dccfdcc (patch)
tree16d3d7e0efec7648b725032148b1db813ef7f5e0 /va/wayland
parentb0e7feda096d7ae8146ba2e0c22b7bd59b768950 (diff)
downloadlibva-1b04587eee33537fe862baf6fc6fc3937dccfdcc.tar.gz
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 <sw@jkqxz.net>
Diffstat (limited to 'va/wayland')
-rw-r--r--va/wayland/va_wayland.c4
1 files changed, 2 insertions, 2 deletions
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;