mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 05:45:58 +00:00
omx: Always reset buffer flags for output ports, even in flushing/error state
This commit is contained in:
parent
cf22a12156
commit
b66fd610d6
1 changed files with 8 additions and 5 deletions
13
omx/gstomx.c
13
omx/gstomx.c
|
@ -1045,6 +1045,14 @@ gst_omx_port_release_buffer (GstOMXPort * port, GstOMXBuffer * buf)
|
||||||
|
|
||||||
g_mutex_lock (port->port_lock);
|
g_mutex_lock (port->port_lock);
|
||||||
|
|
||||||
|
if (port->port_def.eDir == OMX_DirInput) {
|
||||||
|
/* Reset all flags, some implementations don't
|
||||||
|
* reset them themselves and the flags are not
|
||||||
|
* valid anymore after the buffer was consumed
|
||||||
|
*/
|
||||||
|
buf->omx_buf->nFlags = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) {
|
if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) {
|
||||||
GST_ERROR_OBJECT (comp->parent, "Component is in error state: %s (0x%08x)",
|
GST_ERROR_OBJECT (comp->parent, "Component is in error state: %s (0x%08x)",
|
||||||
gst_omx_error_to_string (err), err);
|
gst_omx_error_to_string (err), err);
|
||||||
|
@ -1069,11 +1077,6 @@ gst_omx_port_release_buffer (GstOMXPort * port, GstOMXBuffer * buf)
|
||||||
if (port->port_def.eDir == OMX_DirInput) {
|
if (port->port_def.eDir == OMX_DirInput) {
|
||||||
err = OMX_EmptyThisBuffer (comp->handle, buf->omx_buf);
|
err = OMX_EmptyThisBuffer (comp->handle, buf->omx_buf);
|
||||||
} else {
|
} else {
|
||||||
/* Reset all flags, some implementations don't
|
|
||||||
* reset them themselves and the flags are not
|
|
||||||
* valid anymore after the buffer was consumed
|
|
||||||
*/
|
|
||||||
buf->omx_buf->nFlags = 0;
|
|
||||||
err = OMX_FillThisBuffer (comp->handle, buf->omx_buf);
|
err = OMX_FillThisBuffer (comp->handle, buf->omx_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue