Is input CUstream only supported in NvEncSetIOCudaStreams?

I have some CUDA pre-processing I want to pipeline by using CUstream, and then encode and output to host memory directly. I also run multiple instances of this on the same GPU, I assume by using CUstream I can get better concurrency.

So I’m calling NvEncSetIOCudaStreams(inputStream, NULL), but hitting exception in encode library.
Is this a supported scenario and am I right by calling the API above?

Looks like I just need to call NvEncSetIOCudaStreams(&inputStream, &inputStream);