浏览代码

hwcontext_opencl: Reset internal command queue on device_uninit

device_uninit can be called twice if device_init fails.
Mark Thompson 8 年之前
父节点
当前提交
f4e319d8a9
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      libavutil/hwcontext_opencl.c

+ 1 - 0
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;
     }
 }