nvdecoder: Use own CUDA stream in GL output path

Use the same CUDA stream passed to CuvidMapVideoFrame()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3611>
This commit is contained in:
Seungha Yang 2022-12-21 00:20:17 +09:00 committed by GStreamer Marge Bot
parent cd78cbac86
commit 14062c06a6

View file

@ -667,13 +667,13 @@ gst_nv_decoder_copy_frame_to_gl_internal (GstGLContext * context,
copy_params.dstDevice = dst_ptr;
copy_params.Height = GST_VIDEO_INFO_COMP_HEIGHT (info, i);
if (!gst_cuda_result (CuMemcpy2DAsync (&copy_params, NULL))) {
if (!gst_cuda_result (CuMemcpy2DAsync (&copy_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++) {