summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau/device.c
diff options
context:
space:
mode:
authorThomas Balling Sørensen <tball@tball-laptop.(none)>2010-10-07 00:26:46 +0200
committerThomas Balling Sørensen <tball@tball-laptop.(none)>2010-10-07 00:26:46 +0200
commitbff1ac875c2c62ba5045bb953f800253c49361cb (patch)
treee0a23c862fe2e4f9bef96ec30efd5f9f87bd0917 /src/gallium/state_trackers/vdpau/device.c
parent65fe0866aec7b5608419f6d184cb1fa4fe1dc45a (diff)
vl: some more fixes and addition to the decoder handling
Diffstat (limited to 'src/gallium/state_trackers/vdpau/device.c')
-rw-r--r--src/gallium/state_trackers/vdpau/device.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c
index 4ca198e874d..496e2b8def0 100644
--- a/src/gallium/state_trackers/vdpau/device.c
+++ b/src/gallium/state_trackers/vdpau/device.c
@@ -26,6 +26,7 @@
**************************************************************************/
#include <pipe/p_compiler.h>
+#include <pipe/p_video_context.h>
#include <vl_winsys.h>
#include <util/u_memory.h>
#include <util/u_debug.h>
@@ -51,8 +52,15 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device, VdpGe
ret = VDP_STATUS_RESOURCES;
goto no_dev;
}
+
dev->display = display;
dev->screen = screen;
+ dev->vscreen = vl_screen_create(display, screen);
+ if (!dev->vscreen)
+ {
+ ret = VDP_STATUS_RESOURCES;
+ goto no_vscreen;
+ }
*device = vlAddDataHTAB(dev);
if (*device == 0) {
@@ -66,6 +74,8 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device, VdpGe
return VDP_STATUS_OK;
no_handle:
+ /* Destroy vscreen */
+no_vscreen:
FREE(dev);
no_dev:
vlDestroyHTAB();