msdkdec: set decode_only for output only

MSDK may return MFX_ERR_MORE_DATA but without output surface

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/887
This commit is contained in:
Haihao Xiang 2019-02-11 13:53:19 +08:00 committed by Víctor Manuel Jáquez Leal
parent 5f2f289b7e
commit 028338ff44

View file

@ -1025,8 +1025,11 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
break;
}
} else if (status == MFX_ERR_MORE_DATA) {
if (task->surface) {
task->decode_only = TRUE;
thiz->next_task = (thiz->next_task + 1) % thiz->tasks->len;
}
if (surface->surface->Data.Locked > 0)
surface = NULL;
flow = GST_VIDEO_DECODER_FLOW_NEED_DATA;