From f4e319d8a94697f21802e2682085599a93a39a57 Mon Sep 17 00:00:00 2001 From: Mark Thompson Date: Sat, 25 Nov 2017 15:34:43 +0000 Subject: [PATCH] hwcontext_opencl: Reset internal command queue on device_uninit device_uninit can be called twice if device_init fails. --- libavutil/hwcontext_opencl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c index 8754d73939..b00c1b6409 100644 --- a/libavutil/hwcontext_opencl.c +++ b/libavutil/hwcontext_opencl.c @@ -883,6 +883,7 @@ static void opencl_device_uninit(AVHWDeviceContext *hwdev) av_log(hwdev, AV_LOG_ERROR, "Failed to release internal " "command queue reference: %d.\n", cle); } + priv->command_queue = NULL; } }