diff --git a/omx/gstomx.c b/omx/gstomx.c index 375c2ea75b..61e715ee2a 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -971,8 +971,10 @@ retry: done: g_mutex_unlock (port->port_lock); - if (_buf) + if (_buf) { + g_assert (_buf == _buf->omx_buf->pAppPrivate); *buf = _buf; + } GST_DEBUG_OBJECT (comp->parent, "Acquired buffer %p from port %u: %d", _buf, port->index, ret); @@ -1009,6 +1011,8 @@ gst_omx_port_release_buffer (GstOMXPort * port, GstOMXBuffer * buf) goto done; } + g_assert (buf == buf->omx_buf->pAppPrivate); + /* FIXME: What if the settings cookies don't match? */ buf->used = TRUE; @@ -1339,6 +1343,7 @@ gst_omx_port_deallocate_buffers_unlocked (GstOMXPort * port) * to deallocate as much as possible. */ if (buf->omx_buf) { + g_assert (buf == buf->omx_buf->pAppPrivate); tmp = OMX_FreeBuffer (comp->handle, port->index, buf->omx_buf); if (tmp != OMX_ErrorNone) { GST_ERROR_OBJECT (comp->parent,