Quantcast
Channel: Intel® Software - Media
Viewing all articles
Browse latest Browse all 2185

What to do on MFX_WRN_DEVICE_BUSY?

$
0
0

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;
I've elided some of the error checking for conciseness.  

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? 


Viewing all articles
Browse latest Browse all 2185

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>