diff --git a/omx/gstomxaudiosink.c b/omx/gstomxaudiosink.c index 6f1daebebf..173973917d 100644 --- a/omx/gstomxaudiosink.c +++ b/omx/gstomxaudiosink.c @@ -318,14 +318,14 @@ gst_omx_audio_sink_open (GstAudioSink * audiosink) err = gst_omx_port_set_enabled (self->in_port, FALSE); if (err != OMX_ErrorNone) { - GST_ERROR_OBJECT (self, "Failed to enable port: %s (0x%08x)", + GST_ERROR_OBJECT (self, "Failed to disable port: %s (0x%08x)", gst_omx_error_to_string (err), err); return FALSE; } err = gst_omx_port_set_enabled (self->out_port, FALSE); if (err != OMX_ErrorNone) { - GST_ERROR_OBJECT (self, "Failed to enable port: %s (0x%08x)", + GST_ERROR_OBJECT (self, "Failed to disable port: %s (0x%08x)", gst_omx_error_to_string (err), err); return FALSE; } @@ -589,6 +589,13 @@ gst_omx_audio_sink_prepare (GstAudioSink * audiosink, goto activation; } + err = gst_omx_port_set_flushing (self->in_port, 5 * GST_SECOND, FALSE); + if (err != OMX_ErrorNone) { + GST_ERROR_OBJECT (self, "Failed to set port not flushing: %s (0x%08x)", + gst_omx_error_to_string (err), err); + goto activation; + } + err = gst_omx_port_set_enabled (self->in_port, TRUE); if (err != OMX_ErrorNone) { GST_ERROR_OBJECT (self, "Failed to enable port: %s (0x%08x)", @@ -729,13 +736,6 @@ gst_omx_audio_sink_unprepare (GstAudioSink * audiosink) goto failed; } - err = gst_omx_port_set_flushing (self->in_port, 5 * GST_SECOND, FALSE); - if (err != OMX_ErrorNone) { - GST_ERROR_OBJECT (self, "Failed to set port not flushing: %s (0x%08x)", - gst_omx_error_to_string (err), err); - goto failed; - } - gst_omx_component_get_state (self->comp, GST_CLOCK_TIME_NONE); return TRUE;