OSDN Git Service

Move driver context allocation to common code
[android-x86/hardware-intel-common-libva.git] / va / va.c
diff --git a/va/va.c b/va/va.c
index 819bef1..257b241 100644 (file)
--- a/va/va.c
+++ b/va/va.c
@@ -275,6 +275,17 @@ VADisplayContextP va_newDisplayContext(void)
     return dctx;
 }
 
+VADriverContextP va_newDriverContext(VADisplayContextP dctx)
+{
+    VADriverContextP ctx = calloc(1, sizeof(*ctx));
+    if (!ctx)
+        return NULL;
+
+    dctx->pDriverContext = ctx;
+
+    return ctx;
+}
+
 static bool va_checkVtable(VADisplay dpy, void *ptr, char *function)
 {
     if (!ptr) {