[Mesa-dev] [PATCH v2 3/4] st/vdpau: check if compositor is initilized successfully
Nayan Deshmukh
nayan26deshmukh at gmail.com
Thu Dec 15 14:12:30 UTC 2016
Signed-off-by: Nayan Deshmukh <nayan26deshmukh at gmail.com>
---
src/gallium/state_trackers/vdpau/device.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c
index 81b7582..8bae064 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:
--
2.9.3
More information about the mesa-dev
mailing list