From 7739049df54dda3fc2224d2afceb28277629e8ca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 6 Jul 2011 13:26:51 +0200 Subject: [PATCH] omx: Always try to deallocate buffers, even if there's a component error --- omx/gstomx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/omx/gstomx.c b/omx/gstomx.c index 3493f6a..cd421e5 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -1023,21 +1023,21 @@ gst_omx_port_deallocate_buffers_unlocked (GstOMXPort * port) if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) { GST_ERROR_OBJECT (comp->parent, "Component in error state: %d", err); - goto done; + /* We still try to deallocate all buffers */ } /* We only allow deallocation of buffers after they * were all released from the port, either by flushing * the port or by disabling it. */ - g_assert (g_queue_get_length (port->pending_buffers) == port->buffers->len); - n = port->buffers->len; for (i = 0; i < n; i++) { GstOMXBuffer *buf = g_ptr_array_index (port->buffers, i); OMX_ERRORTYPE tmp = OMX_ErrorNone; - g_assert (!buf->used); + if (buf->used) + GST_ERROR_OBJECT (comp->parent, + "Trying to free used buffer %p of port %u", buf, port->index); /* omx_buf can be NULL if allocation failed earlier * and we're just shutting down -- 2.7.4