Video decoder doesn't return decoded frame right away

I have a RTX2080 on win11 and use NvDecoder::Decode to decode frame by frame.
My bitstream is IPPPPPP (no Bs). I have observed nFrames is always 0 on the first Decode call below with nVideoBytes containing the first frame data
nFrames=gpDecoder->Decode(pVideo, nVideoBytes, 0, pts);

Second call of Decoder with nVideoBytes contains the 2nd frame data and it returns nFrames=1
nFrames=gpDecoder->Decode(pVideo, nVideoBytes, 0, pts);

It seems decoder doesn’t return the current frame until next frame decoding.
why is that? My bitstream IPPPPP so I expect decoder should returned decoded frame for each frame video bitstream after decoding
Do I miss something?