Path: blob/main/multimedia/QtAV/files/patch-src_codec_video_SurfaceInteropCUDA.cpp
16149 views
--- src/codec/video/SurfaceInteropCUDA.cpp.orig 2020-08-26 17:34:29 UTC1+++ src/codec/video/SurfaceInteropCUDA.cpp2@@ -132,7 +132,7 @@ bool HostInteropResource::map(int picIndex, const CUVI3if (!ensureResource(pitch, H)) //copy height is coded height4return false;5// the same thread (context) as cuMemAllocHost, so no ccontext switch is needed6- CUDA_ENSURE(cuMemcpyDtoH(host_mem.data, devptr, pitch*H*3/2), NULL);7+ CUDA_ENSURE(cuMemcpyDtoH(host_mem.data, devptr, pitch*H*3/2), false);8host_mem.index = picIndex;9}10// map to texture11@@ -173,7 +173,7 @@ bool HostInteropResource::ensureResource(int pitch, in12if (!share_ctx) // cuMemFreeHost will be called in dtor which is not the current thread.13CUDA_WARN(cuCtxPushCurrent(ctx));14// NV1215- CUDA_ENSURE(cuMemAllocHost((void**)&host_mem.data, pitch*height*3/2), NULL);16+ CUDA_ENSURE(cuMemAllocHost((void**)&host_mem.data, pitch*height*3/2), false);17if (!share_ctx)18CUDA_WARN(cuCtxPopCurrent(NULL)); //can be null or &ctx19return true;202122