diff options
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/openclwrapper.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libhb/openclwrapper.c b/libhb/openclwrapper.c index 92cc18287..c906f68f9 100644 --- a/libhb/openclwrapper.c +++ b/libhb/openclwrapper.c @@ -1126,6 +1126,11 @@ int hb_cl_free_mapped_buffer(cl_mem mem, unsigned char *addr) hb_ocl->clWaitForEvents(1, &event); else hb_log("hb_free_mapped_buffer: error %d", status); + + status = hb_ocl->clReleaseMemObject(mem); + if (status != CL_SUCCESS) + hb_log("hb_free_mapped_buffer: release error %d",status); + return (status == CL_SUCCESS) ? 1 : 0; } |