omxaudiosink: Set port to not flushing in prepare() and keep it at flushing in unprepare()

https://bugzilla.gnome.org/show_bug.cgi?id=733168
This commit is contained in:
Sebastian Dröge 2014-07-20 17:46:30 +02:00
parent 08385fe944
commit c4deb7c07c

View file

@ -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;