title: "NV_ENC_ERR_INVALID_VERSION" error while using nvenc encoder
body: <p>I am using the cuda nvenc encoder to encode an YUV frame. I want to stream the encoded h264 data using RTSP streaming. I need the SPSPPS buffer to do RTSP stream. I am using "nvEncGetSequenceParams" to get the spspps buffer. I have called this function after calling the "nvEncInitializeEncoder" function as expected.  I am getting the "NV_ENC_ERR_INVALID_VERSION" error which means I am passing wrong struct to this function. but I have checked multiple times the struct I have passed is correct. I think this can be driver version problem. I have Quadro k5000 GPU. I have tried this on driver version 331.82 and 337.88. Following is the code I am using.</p>
  
  <pre><code>NVENCSTATUS CNvEncoderH264::GetSPSPPSBUffer(char *SPSPPSBuffer)
  {
  
      NVENCSTATUS nvSta = NV_ENC_SUCCESS;
      uint32_t size = 0;
  
      //m_spspps is of type NV_ENC_SEQUENCE_PARAM_PAYLOAD
      m_spspps.inBufferSize = 512;
      m_spspps.outSPSPPSPayloadSize = &amp;size;
      SET_VER(m_spspps, NV_ENC_INITIALIZE_PARAMS);
  
      m_spspps.spsppsBuffer = SPSPPSBuffer;
  
      nvSta = m_pEncodeAPI-&gt;nvEncGetSequenceParams(m_hEncoder,&amp;m_spspps);
      return nvSta;
  }
  </code></pre>