mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-01 09:27:44 +00:00
libavutil/hwcontext_cuda: don't destroy external context when using current CUDA context
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
This commit is contained in:
parent
442d9412d2
commit
f904e60c32
1 changed files with 1 additions and 1 deletions
|
@ -290,7 +290,7 @@ static void cuda_device_uninit(AVHWDeviceContext *device_ctx)
|
|||
if (hwctx->internal->is_allocated && hwctx->cuda_ctx) {
|
||||
if (hwctx->internal->flags & AV_CUDA_USE_PRIMARY_CONTEXT)
|
||||
CHECK_CU(cu->cuDevicePrimaryCtxRelease(hwctx->internal->cuda_device));
|
||||
else
|
||||
else if (!(hwctx->internal->flags & AV_CUDA_USE_CURRENT_CONTEXT))
|
||||
CHECK_CU(cu->cuCtxDestroy(hwctx->cuda_ctx));
|
||||
|
||||
hwctx->cuda_ctx = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue