ffmpeg | branch: master | Roman Arzumanyan <[email protected]> | Fri Sep 29 15:36:31 2023 +0300| [f904e60c32a87f4124c3b94598a3b0141cd8b1b9] | committer: Timo Rothenpieler
libavutil/hwcontext_cuda: don't destroy external context when using current CUDA context Signed-off-by: Timo Rothenpieler <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f904e60c32a87f4124c3b94598a3b0141cd8b1b9 --- libavutil/hwcontext_cuda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext_cuda.c b/libavutil/hwcontext_cuda.c index c648723285..0312d3b9d7 100644 --- a/libavutil/hwcontext_cuda.c +++ b/libavutil/hwcontext_cuda.c @@ -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; _______________________________________________ ffmpeg-cvslog mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
