nvencoder: Fix critical warning in autogpu mode

If upstream memory is not CUDA, CUDA context will be null.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3992>
This commit is contained in:
Seungha Yang 2023-02-18 22:09:37 +09:00
parent 59f359eb99
commit 58373e38f4

View file

@ -935,9 +935,6 @@ gst_nv_encoder_init_session (GstNvEncoder * self, GstBuffer * in_buf)
if (priv->stream)
gst_cuda_stream_ref (priv->stream);
}
if (!priv->stream)
priv->stream = gst_cuda_stream_new (priv->context);
}
}
#ifdef G_OS_WIN32