diff options
Diffstat (limited to 'src/gallium/state_trackers/vdpau/device.c')
-rw-r--r-- | src/gallium/state_trackers/vdpau/device.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c index 81b75827f34..8bae0647720 100644 --- a/src/gallium/state_trackers/vdpau/device.c +++ b/src/gallium/state_trackers/vdpau/device.c @@ -128,13 +128,19 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device, goto no_handle; } - vl_compositor_init(&dev->compositor, dev->context); + if (!vl_compositor_init(&dev->compositor, dev->context)) { + ret = VDP_STATUS_ERROR; + goto no_compositor; + } + pipe_mutex_init(dev->mutex); *get_proc_address = &vlVdpGetProcAddress; return VDP_STATUS_OK; +no_compositor: + vlRemoveDataHTAB(*device); no_handle: pipe_sampler_view_reference(&dev->dummy_sv, NULL); no_resource: |