mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
omx: Properly release buffers during flushing
We can't pass them back to OMX_FillThisBuffer() or OMX_EmptyThisBuffer() but instead of doing nothing we have to put them back into our queue. Otherwise the buffer is leaked and we will have too few buffers in the future.
This commit is contained in:
parent
9151617d39
commit
0682012181
1 changed files with 4 additions and 1 deletions
|
@ -1054,6 +1054,8 @@ gst_omx_port_release_buffer (GstOMXPort * port, GstOMXBuffer * buf)
|
|||
if (port->flushing) {
|
||||
GST_DEBUG_OBJECT (comp->parent, "Port %u is flushing, not releasing buffer",
|
||||
port->index);
|
||||
g_queue_push_tail (port->pending_buffers, buf);
|
||||
g_cond_broadcast (port->port_cond);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -1073,9 +1075,10 @@ gst_omx_port_release_buffer (GstOMXPort * port, GstOMXBuffer * buf)
|
|||
err = OMX_FillThisBuffer (comp->handle, buf->omx_buf);
|
||||
}
|
||||
|
||||
done:
|
||||
GST_DEBUG_OBJECT (comp->parent, "Released buffer %p to port %u: %s (0x%08x)",
|
||||
buf, port->index, gst_omx_error_to_string (err), err);
|
||||
|
||||
done:
|
||||
g_mutex_unlock (port->port_lock);
|
||||
|
||||
return err;
|
||||
|
|
Loading…
Reference in a new issue