From 065878a5d4a21db4cfb46cbf5381d41017edd0d1 Mon Sep 17 00:00:00 2001 From: Gurkirpal Singh Date: Sun, 7 May 2017 20:09:54 +0530 Subject: [PATCH] omx: always ignore OMX_ErrorPortUnpopulated It is safe to ignore it always. Tizonia notifies this error to pass some khronos conformance tests. Problem is that gst-omx saves this error in comp->last_error and then gst_omx_port_set_enabled early error out which fails the pipeline. https://bugzilla.gnome.org/show_bug.cgi?id=782800 --- omx/gstomx.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/omx/gstomx.c b/omx/gstomx.c index 2fef361..17c76c3 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -513,15 +513,25 @@ EventHandler (OMX_HANDLETYPE hComponent, OMX_PTR pAppData, OMX_EVENTTYPE eEvent, case OMX_EventError: { GstOMXMessage *msg; + OMX_ERRORTYPE error_type = nData1; /* Yes, this really happens... */ - if (nData1 == OMX_ErrorNone) + if (error_type == OMX_ErrorNone) break; + /* Always ignore PortUnpopulated error. This error is informational + * at best but it is useful for debugging some strange scenarios. + */ + if (error_type == OMX_ErrorPortUnpopulated) { + GST_DEBUG_OBJECT (comp->parent, "%s got error: %s (0x%08x)", + comp->name, gst_omx_error_to_string (error_type), error_type); + break; + } + msg = g_slice_new (GstOMXMessage); msg->type = GST_OMX_MESSAGE_ERROR; - msg->content.error.error = nData1; + msg->content.error.error = error_type; GST_ERROR_OBJECT (comp->parent, "%s got error: %s (0x%08x)", comp->name, gst_omx_error_to_string (msg->content.error.error), msg->content.error.error); -- 2.7.4