summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau/device.c
diff options
context:
space:
mode:
authorNayan Deshmukh <[email protected]>2017-01-03 16:17:46 +0530
committerChristian König <[email protected]>2017-01-03 12:02:15 +0100
commit29aad4e8bd72fc022ade03f49bc8aa25419a3773 (patch)
tree072d9bdb83d452297180a01a9bb505ffa72488d5 /src/gallium/state_trackers/vdpau/device.c
parentcee5af93ee5ea9e3c4dd19047952fec6bcfed2b6 (diff)
st/vdpau: error handling
handle the cases when vl_compositor_set_csc_matrix(), vl_compositor_init_state() and vl_compositor_init() fail Signed-off-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau/device.c')
-rw-r--r--src/gallium/state_trackers/vdpau/device.c8
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: