Whenever a video has b-frames I see garbage in the picture and frames seemingly playing out of order. The timestamps are in the correct output order, it's really the pictures that are messed up. The decode sample works fine so it must be something I'm doing wrong in my application. I've looked carefully but I'm at a loss to explain what's going on.
I am using system memory without providing an allocator to the session. I have a queue of indices that indicate which ones are not in use by the renderer. Indices are put here in whatever order as they return from rendering. From this queue I pick the first index where mfxFrameSurface1.Data.Locked is 0 (this should tell me that the frame is not in use by the decoder) and that's what I pass to DecodeFrameAsync along with a corresponding syncpoint and a pointer set to null for the output surface. Then when the function returns MFX_ERR_NONE I do SyncOperation with the same syncpoint and then I pass the frame index (as well as the data and infos) to the renderer for display.
Hello there. Can you please use the following recommendation to post your questions, especially when you are using your own application. https://software.intel.com/en-us/forums/topic/531083 .
For questions such as these, we recommend you try to use existing samples and/or tutorials to run the input in question and see if it works. If it works fine, then there is a very high chance your application has some issues. In short, follow the format in the thread above and give us more details please.