nvenc: random access to an H264 file with the decoder

Hi all,

I am currently using nvenc to decode a H264 file and I require random access to the file. So, what I did for test purposes was make every frame a IDR frame. Now, if I know the file offset of the frame in the H264 file. Is it enough to just seek to that position, read the amount of bytes that was written for that frame and pass that to the decoder. My understanding is that the decoder should be able to handle just a single IDR frame and be able to decode it. Is that correct?