- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am implementing a video player using the Intel MSDK for decoding. At the end of a file, I flush the remaining frames by passing null to DecodeFrameAsync, like so:
mfxFrameSurface1* outSurface = nullptr;
mfxSyncPoint syncPoint;
int index = GetFreeSurfaceIndex(...);
mfxStatus sts = m_mfxVideoDecoder->DecodeFrameAsync(nullptr, &(m_mfxFrameSurfaces[index]), &outSurface, &syncPoint);
if (sts == MFX_ERR_MORE_DATA) { return; }
DebugPrint(sts);
sts = m_mfxVideoSession->SyncOperation(syncPoint, MSDK_DEC_WAIT_INTERVAL);
DebugPrint(sts);
// now outSurface is a new frame, enqueue it
return;
This works fine in general, however with one particular video file the first DebugPrint shows MFX_WRN_DEVICE_BUSY, and then the second shows MFX_ERR_NULL_PTR. First, I am puzzled as to why the API would return DEVICE_BUSY since I am stepping through my code very slowly in the debugger and it has had ample time to finish the operation, but anyway, the most important question is, what am I supposed to do in this case? Should I just repeat the method call until it returns something else?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
MFX_WRN_DEVICE_BUSY is a normal and expected return code. It means that the HW device is busy or unable to respond at that moment in time. As illustrated by the Media SDK samples, just insert small delay and reissue the Media SDK API call.
Regards,
Petter
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
MFX_WRN_DEVICE_BUSY is a normal and expected return code. It means that the HW device is busy or unable to respond at that moment in time. As illustrated by the Media SDK samples, just insert small delay and reissue the Media SDK API call.
Regards,
Petter

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page