From 3301dd34b50b6756f327cb60db3f1242b513d67f Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Thu, 23 Nov 2017 12:38:11 +0900 Subject: [PATCH] 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 --- sys/msdk/gstmsdkdec.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/msdk/gstmsdkdec.c b/sys/msdk/gstmsdkdec.c index 77f7d30b94..b51851cee5 100644 --- a/sys/msdk/gstmsdkdec.c +++ b/sys/msdk/gstmsdkdec.c @@ -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);