From c4deb7c07ca797ab6af779d5bbd87a20433fd7e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 20 Jul 2014 17:46:30 +0200 Subject: [PATCH] omxaudiosink: Set port to not flushing in prepare() and keep it at flushing in unprepare() https://bugzilla.gnome.org/show_bug.cgi?id=733168 --- omx/gstomxaudiosink.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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;