Skip to content
Snippets Groups Projects
Commit 8ee85ed0 authored by Haihao Xiang's avatar Haihao Xiang Committed by Víctor Manuel Jáquez Leal
Browse files

msdkdec: release the occupied surface for MFX_WRN_DEVICE_BUSY

When MFXVideoDECODE_DecodeFrameAsync () returns MFX_WRN_DEVICE_BUSY with
an output surface, a new input surface is required when retrying
MFXVideoDECODE_DecodeFrameAsync ().

This fixes the out-of-surface issue mentioned in
gstreamer/gst-plugins-bad#890
parent b9f070f7
No related branches found
No related tags found
Loading
Checking pipeline status
......@@ -1041,6 +1041,12 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
/* If device is busy, wait 1ms and retry, as per MSDK's recomendation */
g_usleep (1000);
if (task->surface &&
task->surface == surface->surface && !task->sync_point) {
free_surface (thiz, surface);
surface = NULL;
}
/* If the current surface is still busy, we should do sync oepration
* then tries to decode again
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment