From 429b0e1e2738b14bfd307d03b001e5b51fc5a720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 19 May 2014 09:04:09 +0200 Subject: omxvideodec: Check return value of gst_omx_port_set_enabled() for errors CID 1214589 --- omx/gstomxvideodec.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'omx/gstomxvideodec.c') diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 27f3b3b..2536d82 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -787,8 +787,15 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self) min); min = port->port_def.nBufferCountMin; - if (!was_enabled) - gst_omx_port_set_enabled (port, FALSE); + if (!was_enabled) { + err = gst_omx_port_set_enabled (port, FALSE); + if (err != OMX_ErrorNone) { + GST_INFO_OBJECT (self, + "Failed to disable port again: %s (0x%08x)", + gst_omx_error_to_string (err), err); + goto done; + } + } if (min != port->port_def.nBufferCountActual) { err = gst_omx_port_update_port_definition (port, NULL); -- cgit v1.2.1