From 1c0396de0effcc2fa23d6470803703ee80cc5f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 18 Nov 2011 09:58:58 -0800 Subject: [PATCH] omxvideodec: First set ports to flushing before waiting for the srcpad streaming thread to finish --- omx/gstomxvideodec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index e4fa6772d6..07a278fb92 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -917,6 +917,9 @@ gst_omx_video_dec_stop (GstBaseVideoDecoder * decoder) GST_DEBUG_OBJECT (self, "Stopping decoder"); + gst_omx_port_set_flushing (self->in_port, TRUE); + gst_omx_port_set_flushing (self->out_port, TRUE); + gst_pad_stop_task (GST_BASE_VIDEO_CODEC_SRC_PAD (decoder)); if (gst_omx_component_get_state (self->component, 0) > OMX_StateIdle) @@ -931,9 +934,6 @@ gst_omx_video_dec_stop (GstBaseVideoDecoder * decoder) g_cond_broadcast (self->drain_cond); g_mutex_unlock (self->drain_lock); - gst_omx_port_set_flushing (self->in_port, TRUE); - gst_omx_port_set_flushing (self->out_port, TRUE); - gst_omx_component_get_state (self->component, 5 * GST_SECOND); gst_buffer_replace (&self->codec_data, NULL);