SyncOperation returns MFX_ERR_ABORTED on first two frames
I've got an interesting issue about MediaSDK H.264 Encoder. Several tasks are put to encode untill pool capacity is reached (it equails 4). Now I have 4 frames, and call m_pmfxSession->SyncOperation on the very first task. The return is MFX_ERR_ABORTED, but DependentVppTasks is empty. Afterwards I've decided to delete this task from task list, and switch to the next one. The second SyncOperation also returns MFX_ERR_ABORTED. And finally the third task's sync operation succedes. After it succeded, I tryed switching back to the first task, but still got MFX_ERR_ABORTED.
What are possible reasons of such behavior? Win 7 x64, 32-bit DirectShow filter. Closed GOP size 25, 1 B frame, 2 ref frames.
If I switch B-frames count to 0, SyncOperation call on the very first task returns MFX_ERR_NONE.
It's difficult to say without looking at the code you have got.
Directly what I can say, actually ask you: do you use the same onem_pmfxSession->SyncOperation for all tasks? If yes, there must be the problem: each task have to get own SyncOperation. You've got pool of 4 frames, so you have to assign 4 different SyncOperations tothe tasks, and reuse them after they are done.
Yes, the same m_pmfxSession->SyncOperation function call, but each task has it's own syncopid. After two frames everything works. The first frame doesn't get to task list, because MFXEncode returns result code, that the frame needs to be cached when coding with 1 B frame.