Nvdec fails to create a CUDA context

After compiling the Gstreamer plugin nvdec from the Video Codec SDK’s source code, I tried to test it using gst-launch-1.0, but an error was received that doesn’t seem to describe the cause of the error.

GST_DEBUG=3,nvdec:6 gst-launch-1.0 rtspsrc location=[rtsp_stream_location] ! rtph264depay ! h264parse ! nvdec ! fakesink

Setting pipeline to PAUSED ...
0:00:00.014932588 18620 0x5560b5bc9130 DEBUG                  nvdec gstnvdec.c:393:gst_nvdec_start:<nvdec0> creating CUDA context
0:00:00.107164045 18620 0x5560b5bc9130 ERROR                  nvdec gstnvdec.c:398:gst_nvdec_start:<nvdec0> failed to create CUDA context or lock
0:00:00.107188111 18620 0x5560b5bc9130 WARN            videodecoder gstvideodecoder.c:2542:gst_video_decoder_change_state:<nvdec0> error: Failed to start decoder
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstNvDec:nvdec0: Could not initialize supporting library.
Additional debug info:
gstvideodecoder.c(2542): gst_video_decoder_change_state (): /GstPipeline:pipeline0/GstNvDec:nvdec0:
Failed to start decoder
Setting pipeline to NULL ...
Freeing pipeline ...

After checking with gstnvdec.c, it seemed that the plugin failed when creating a cuda context lock. Replacing nvdec with the decodebin plugin works.
My GPU specs are: Cuda 10.2, Driver version 460.67, Quadro RTX 4000

gst-inspect-1.0 nvdec gives the plugin’s information

Factory Details:
      Rank                     primary (256)
      Long-name                NVDEC video decoder
      Klass                    Decoder/Video
      Description              NVDEC video decoder
      Author                   Ericsson AB, http://www.ericsson.com

Plugin Details:
  Name                     nvdec
  Description              GStreamer NVDEC plugin
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnvdec.so
  Version                  1.14.5
  License                  BSD
  Source module            gst-plugins-bad
  Source release date      2019-05-29
  Binary package           GStreamer Bad Plug-ins source release
  Origin URL               Unknown package origin

What could be the issue for this?

Sorry, no idea.
You may reach out on Gstreamer forum or contact plugin developers/maintainers. If this turns out to be NVIDIA Video Codec SDK or driver issue, let us know.