nvEncLockBitstream returning wrong frame type for interlaced

I’m trying to use NVEnc to encode interlaced video. My product makes decisions at the muxer stage based on frame type, so I’m passing the frame type from the encoder down the chain to the muxer. This works fine for progressive video, as all the frame types returned by the encoder match the actual frame types. But when I encode interlaced video the very first frame returned is marked as a P frame even though according to the NALs it’s an IDR. Is this a bug? Or is there some setting I’m missing that will cause it to return the proper frame type in the struct? I’d hate to have to parse every frame myself just to determine the proper type.

Looking at the NALs closer I see that you guys use a IDR for the top field and P for the bottom field, but the frame type in nvEncLockBitstream is always matched to the bottom field. I need to know when it’s an IDR frame because I use that info up stream to know which frames contain an SPS/PPS. I don’t want to have to parse the NALs of every frame looking for SPS/PPS.

Any way we could get a separate variable in the nvEncLockBitstream for top and bottom fields?