You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
hwcontext_vulkan: close exported memory FD on CUDA import error
Prevents resource leakage.
This commit is contained in:
@@ -2676,6 +2676,7 @@ static int vulkan_export_to_cuda(AVHWFramesContext *hwfc,
|
|||||||
|
|
||||||
ret = CHECK_CU(cu->cuImportExternalMemory(&dst_int->ext_mem[i], &ext_desc));
|
ret = CHECK_CU(cu->cuImportExternalMemory(&dst_int->ext_mem[i], &ext_desc));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
close(ext_desc.handle.fd);
|
||||||
err = AVERROR_EXTERNAL;
|
err = AVERROR_EXTERNAL;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user