Wrong SPSPPS buffer while using nvenc encoder

I am trying to use RTSP streaming to stream h264 data. I am using Live555 implementation of RTSP streaming. It uses spspps buffer which is given by the encoder

I am using nvenv enocder (which runs on Kepler and Maxwell GPU) to encode the data. The SPSPPS I get has length 33. The RTSP stream is not working properly and I only see black window at the client (Web Client). The spspps buffer is

0 0 0 1 103 100 0 32 -84 43 64 39 -126 93 -128 -120 0 0 31 64 0 5 -36 4 32 0 0 0 1 104 -18 60 -80

I have tried using CudaEncoder which runs on all nVidia GPU’s. This works fine for me. The spspps buffer length in this case is 45. spspps buffer is

0 37 103 77 64 40 -12 2 120 37 -33 -8 4 -96 7 104 -128 0 1 -12 -128 0 117 48 112 0 0 7 -6 18 0 0 19 18 -48 93 -27 -63 64 0 4 104 -18 60 -128

I know the problem is with spspps buffer only because if I use nvenc encoder and stream data using TCP streamer, I can see the correct output on client (Desktop Client). The TCP streamer does not use spspps buffer.

My CudaEncoder implementation works for both TCP and RTSP stream (Both Desktop and Web Client)

Note : I have following configuration

Cuda SDK 5.0
nvenc_3.0_windows_sdk
Driver versions tested 331.82
Decoder in case of TCP streaming (Desktop Client) : CudaDecoder
Decoder in case of RTSP Streaming (Web Client): vlc NPAPI plugin for web
RTSP Streamer : Live555 implementation
TCP Streamer : Own Implementation

Any help?