msdkdec: keep draining even if a finish_task fails

Should continue draining so that it could try to
discard the rest of pending frames even if a finish_task fails.

https://bugzilla.gnome.org/show_bug.cgi?id=790312
This commit is contained in:
Hyunjun Ko 2017-11-23 12:38:11 +09:00 committed by Sebastian Dröge
parent b7dad57e9e
commit 3301dd34b5

View file

@ -701,8 +701,11 @@ gst_msdkdec_drain (GstVideoDecoder * decoder)
for (;;) {
task = &g_array_index (thiz->tasks, MsdkDecTask, thiz->next_task);
if ((flow = gst_msdkdec_finish_task (thiz, task)) != GST_FLOW_OK)
return flow;
if (gst_msdkdec_finish_task (thiz, task) != GST_FLOW_OK) {
GST_WARNING_OBJECT (decoder,
"failed to finish the task %p, but keep draining for the remaining frames",
task);
}
if (!surface) {
flow = allocate_output_buffer (thiz, &buffer);