diff --git a/source/nvidia/cv/nvidia-cv-texture.cpp b/source/nvidia/cv/nvidia-cv-texture.cpp index a021919b..27fc00fe 100644 --- a/source/nvidia/cv/nvidia-cv-texture.cpp +++ b/source/nvidia/cv/nvidia-cv-texture.cpp @@ -119,9 +119,5 @@ void streamfx::nvidia::cv::texture::free() _cv->NvCV_GetErrorStringFromCode(res)); throw std::runtime_error("NvCVImage_UnmapResource"); } - if (auto res = _cv->NvCVImage_Dealloc(&_image); res != result::SUCCESS) { - D_LOG_ERROR("Object 0x%" PRIxPTR " failed NvCVImage_Dealloc call with error: %s", this, - _cv->NvCV_GetErrorStringFromCode(res)); - throw std::runtime_error("NvCVImage_Dealloc"); - } + _cv->NvCVImage_Dealloc(&_image); } diff --git a/source/nvidia/cv/nvidia-cv.hpp b/source/nvidia/cv/nvidia-cv.hpp index 0ac165a3..2910bcfb 100644 --- a/source/nvidia/cv/nvidia-cv.hpp +++ b/source/nvidia/cv/nvidia-cv.hpp @@ -226,7 +226,7 @@ namespace streamfx::nvidia::cv { NVCVI_DEFINE_FUNCTION(NvCVImage_Realloc, image_t* image, uint32_t width, uint32_t height, pixel_format format, component_type comp_type, uint32_t comp_layout, uint32_t mem_location, uint32_t alignment); - NVCVI_DEFINE_FUNCTION(NvCVImage_Dealloc, image_t* image); + NVCVI_DEFINE_FUNCTION_EX(void, NvCVImage_Dealloc, image_t* image); NVCVI_DEFINE_FUNCTION(NvCVImage_Create, uint32_t width, uint32_t height, pixel_format format, component_type comp_type, component_layout comp_layout, memory_location mem_location, uint32_t alignment, image_t** image);