From 82ddb0600bb39de33712dd2c7aedd4b64932688c Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Fri, 19 Jun 2020 04:10:48 +0900 Subject: [PATCH] nvh264sldec: Fix for possible wrong device selction decoder should select assigned CUDA device id Part-of: --- sys/nvcodec/gstnvh264dec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/nvcodec/gstnvh264dec.c b/sys/nvcodec/gstnvh264dec.c index e050f31..c240653 100644 --- a/sys/nvcodec/gstnvh264dec.c +++ b/sys/nvcodec/gstnvh264dec.c @@ -247,10 +247,11 @@ static gboolean gst_nv_h264_dec_open (GstVideoDecoder * decoder) { GstNvH264Dec *self = GST_NV_H264_DEC (decoder); + GstNvH264DecClass *klass = GST_NV_H264_DEC_GET_CLASS (self); CUresult cuda_ret; if (!gst_cuda_ensure_element_context (GST_ELEMENT_CAST (decoder), - 0, &self->context)) { + klass->cuda_device_id, &self->context)) { GST_ERROR_OBJECT (self, "failed to create CUDA context"); return FALSE; } -- 2.7.4