Hello, I am trying to understand how to reposition the decoder at an arbitrary key frame within an h264 video.
The function MFXVideoDECODE_Reset takes an mfxVideoParam* as an argument, which I assume is the same mfxVideoParam* that was obtained from MFXVideoDECODE_Query after the first successful MFXVideoDECODE_DecodeHeader. Or at least, anything else I tried to pass returned MFX_ERR_INVALID_VIDEO_PARAM.
I'm wondering what should be done with the next data (starting from the new key frame) after the decoder is reset. Should I call DecodeHeader again, but this time skip initializing surfaces since they're already initialized and the video params didn't change? Do I need to call MFXVideoDECODE_Init again? (Apparently not, that failed too.) Apparently the decoder is happy with me continuing to call DecodeAsync as if nothing happened, however sometimes I'm getting artifacts so I assume I'm not resetting the decoder correctly. Or perhaps there's some information missing in the H264 stream?