From eab564d857beea830fb233739ca3c77401aea408 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Mon, 19 Aug 2019 13:22:20 +0900 Subject: [PATCH] nvcodec: Use default flag for CUDA stream creation Since nvdec/nvenc engine is running on default stream, non-default CUDA stream should be synchronized with default stream eventually. --- sys/nvcodec/gstnvbaseenc.c | 2 +- sys/nvcodec/gstnvdec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/nvcodec/gstnvbaseenc.c b/sys/nvcodec/gstnvbaseenc.c index 15bd2653b3..6061a35dc5 100644 --- a/sys/nvcodec/gstnvbaseenc.c +++ b/sys/nvcodec/gstnvbaseenc.c @@ -301,7 +301,7 @@ gst_nv_base_enc_open (GstVideoEncoder * enc) } if (gst_cuda_context_push (nvenc->cuda_ctx)) { - cuda_ret = CuStreamCreate (&nvenc->cuda_stream, CU_STREAM_NON_BLOCKING); + cuda_ret = CuStreamCreate (&nvenc->cuda_stream, CU_STREAM_DEFAULT); if (!gst_cuda_result (cuda_ret)) { GST_WARNING_OBJECT (nvenc, "Could not create cuda stream, will use default stream"); diff --git a/sys/nvcodec/gstnvdec.c b/sys/nvcodec/gstnvdec.c index cec0573f75..c098ca7470 100644 --- a/sys/nvcodec/gstnvdec.c +++ b/sys/nvcodec/gstnvdec.c @@ -627,7 +627,7 @@ gst_nvdec_open (GstVideoDecoder * decoder) } if (gst_cuda_context_push (nvdec->cuda_ctx)) { - cuda_ret = CuStreamCreate (&nvdec->cuda_stream, CU_STREAM_NON_BLOCKING); + cuda_ret = CuStreamCreate (&nvdec->cuda_stream, CU_STREAM_DEFAULT); if (!gst_cuda_result (cuda_ret)) { GST_WARNING_OBJECT (nvdec, "Could not create cuda stream, will use default stream");