From a Media SDK perspective, if you follow the steps described in the "Decoding Procedures" section about "Bitstream Repositioning" and supply data that is not sufficient to decode an entire frame, the DecodeFrameAsync call will return "MFX_ERR_MORE_DATA" and you can send more data until you reach a point in the bitstream that is sufficient.
I am not sure about our sample stream that does not have an IDR slice for 25 seconds, but you could try the method above to see if we also think you need to step this far into the stream to find an access point. I have heard of issues using only IDR to identify an access point. (see http://forum.doom9.org/showthread.php?t=124254)
I know the question has been asked before, but I am not quickly finding the answer. Please let me know if you'd like me to continue to investigate.
Hi, I also found the following notes that might help:
Media SDK decoder bitstream repositioning is described in the Media SDK manual but the following information explains the concept in the context of container handling which is tightly connected to stream repositioning.
Please follow these steps to reposition a stream during a decoding session:
1. Invoke decoder MFXVideoDECODE_Reset() to reset the decoder
2. Clear current Media SDK bit stream buffer (mfxBitStream)
3. Reposition demuxer (splitter) to desired frame backward or forward in stream
It is recommended that demuxer does the following before delivering frames to decoder:
a. Reposition to closest I-frame to the desired position
b. Insert sequence header (sequence parameter set for H.264, or sequence header for MPEG-2 and VC-1) into stream before the I-frame
Note: Some streams may already contain sequence headers before each I-frame
c. If sequence header is inserted before a frame that is not an I-frame, decoder may produce artifacts
4. Read data into Media SDK bit stream buffer from new demuxer position
5. Resume decoding by calling DecodeFrameAsync as usual.
If the Media SDK decoder does not find any sequence headers while decoding from the new position DecodeFrameAsync will continuously return MFX_ERR_MORE_DATA (effectively asking for more bitstream data)