[FFmpeg-cvslog] avutil/hcontext_cuda: Remove unnecessary stream synchronisation

Philip Langdale git at videolan.org
Sat Mar 30 22:11:06 EET 2019


ffmpeg | branch: master | Philip Langdale <philipl at overt.org> | Sat Mar 30 10:56:49 2019 -0700| [52d8f35b14bc379572e74d042d3466b8d3b6e7cf] | committer: Philip Langdale

avutil/hcontext_cuda: Remove unnecessary stream synchronisation

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52d8f35b14bc379572e74d042d3466b8d3b6e7cf
---

 libavutil/hwcontext_cuda.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/libavutil/hwcontext_cuda.c b/libavutil/hwcontext_cuda.c
index 540a7610ef..cca39e9fc7 100644
--- a/libavutil/hwcontext_cuda.c
+++ b/libavutil/hwcontext_cuda.c
@@ -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));
 



More information about the ffmpeg-cvslog mailing list