Use the same CUDA stream passed to CuvidMapVideoFrame()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3611>
copy_params.dstDevice = dst_ptr;
copy_params.Height = GST_VIDEO_INFO_COMP_HEIGHT (info, i);
- if (!gst_cuda_result (CuMemcpy2DAsync (©_params, NULL))) {
+ if (!gst_cuda_result (CuMemcpy2DAsync (©_params, self->cuda_stream))) {
GST_WARNING_OBJECT (self, "memcpy to mapped array failed");
data->ret = FALSE;
}
}
- gst_cuda_result (CuStreamSynchronize (NULL));
+ gst_cuda_result (CuStreamSynchronize (self->cuda_stream));
unmap_video_frame:
for (i = 0; i < num_resources; i++) {