SyncOperation returns MFX_ERR_ABORTED on first two frames

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.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Maxim,

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.

Kind regards,

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.


Could you please provide some info so that we can better understand what may be going on here.

Are you using HW acceleration?What version of Media SDK are you using?

Could you also please capture a log using the Media SDK tracer tool (turn on pre frame logging) and share the log with us.


Leave a Comment

Please sign in to add a comment. Not a member? Join today