From: Sebastian Dröge Date: Mon, 18 Jul 2011 11:10:49 +0000 (+0200) Subject: omx: When acquiring a buffer from an input port always wait until all output ports... X-Git-Tag: 1.0.0~417 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3f3bd1dff59ea00723320432089fb53b26b9ea5;p=platform%2Fupstream%2Fgst-omx.git omx: When acquiring a buffer from an input port always wait until all output ports are reconfigured --- diff --git a/omx/gstomx.c b/omx/gstomx.c index b271a30..898fdd4 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -772,12 +772,12 @@ retry: goto done; } - /* If this is an input port and it needs to be reconfigured we - * first wait here until all output ports are reconfigured and - * then return + /* If this is an input port and at least one of the output ports + * needs to be reconfigured, we wait until all output ports are + * reconfigured. Afterwards this port is reconfigured if required + * or buffers are returned to be filled as usual. */ - if (port->port_def.eDir == OMX_DirInput && - port->settings_cookie != gst_omx_component_get_settings_cookie (comp)) { + if (port->port_def.eDir == OMX_DirInput) { g_mutex_unlock (port->port_lock); g_mutex_lock (comp->state_lock); while (comp->reconfigure_out_pending > 0 && @@ -800,9 +800,13 @@ retry: goto done; } - ret = GST_OMX_ACQUIRE_BUFFER_RECONFIGURE; - port->settings_changed = TRUE; - goto done; + /* Only if this port needs to be reconfigured too notify + * the caller about it */ + if (port->settings_cookie != gst_omx_component_get_settings_cookie (comp)) { + ret = GST_OMX_ACQUIRE_BUFFER_RECONFIGURE; + port->settings_changed = TRUE; + goto done; + } } /* If we have an output port that needs to be reconfigured