]> git.sesse.net Git - ffmpeg/commitdiff
avutil/hcontext_cuda: Remove unnecessary stream synchronisation
authorPhilip Langdale <philipl@overt.org>
Sat, 30 Mar 2019 17:56:49 +0000 (10:56 -0700)
committerPhilip Langdale <philipl@overt.org>
Sat, 30 Mar 2019 17:56:49 +0000 (10:56 -0700)
Similarly to the previous changes, we don't need to synchronise
after a memcpy to device memory. On the other hand, we need to
keep synchronising after a copy to host memory, otherwise there's
no guarantee that subsequent host reads will return valid data.

libavutil/hwcontext_cuda.c

index 540a7610ef954dd94302a7150b0fea541b61fad5..cca39e9fc753f9442fecc3c02af45e9bf10fa240 100644 (file)
@@ -268,10 +268,6 @@ static int cuda_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst,
             goto exit;
     }
 
-    ret = CHECK_CU(cu->cuStreamSynchronize(hwctx->stream));
-    if (ret < 0)
-        goto exit;
-
 exit:
     CHECK_CU(cu->cuCtxPopCurrent(&dummy));