From e89382f5f6c42cc5f4872aa4135b69bc3f09cccf Mon Sep 17 00:00:00 2001 From: pavelxdd Date: Thu, 24 Nov 2016 15:11:44 +0300 Subject: vo_opengl: hwdec_cuda: fix crash when trying to use hwdec=cuda if cuda SDK is not present If CUDA SDK wasn't installed, mpv crashed immediately with the message "Failed to load CUDA symbols" --- video/out/opengl/hwdec_cuda.c | 1 + 1 file changed, 1 insertion(+) diff --git a/video/out/opengl/hwdec_cuda.c b/video/out/opengl/hwdec_cuda.c index 266714a972..dfb55e8ce0 100644 --- a/video/out/opengl/hwdec_cuda.c +++ b/video/out/opengl/hwdec_cuda.c @@ -155,6 +155,7 @@ static int cuda_create(struct gl_hwdec *hw) bool loaded = cuda_load(); if (!loaded) { MP_ERR(hw, "Failed to load CUDA symbols\n"); + return -1; } ret = CHECK_CU(cuInit(0)); -- cgit v1.2.3