vdpau changes
[mesa.git] / src / gallium / state_trackers / vdpau / device.c
index 83fcaff0282f14d1235ea92c7572e2df18c891c4..ba91e16a43f9971ef1ecae5192e1af41db75f92e 100644 (file)
@@ -37,7 +37,8 @@ PUBLIC VdpStatus
 vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device, VdpGetProcAddress **get_proc_address)
 {
    VdpStatus    ret;
-   vlVdpDevice *dev;
+   vlVdpDevice *dev = NULL;
+   struct vl_screen *vlscreen = NULL;
 
    if (!(display && device && get_proc_address))
       return VDP_STATUS_INVALID_POINTER;
@@ -47,11 +48,14 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device, VdpGe
       goto no_htab;
    }
 
-   dev = CALLOC(1, sizeof(vlVdpDevice));
+   dev = CALLOC(0, sizeof(vlVdpDevice));
    if (!dev) {
       ret = VDP_STATUS_RESOURCES;
       goto no_dev;
    }
+   dev->display = display;
+   dev->screen = screen;
+
 
    *device = vlAddDataHTAB(dev);
    if (*device == 0) {