From 0a8cfcde877b50a06a64f7ded4807707edeb1cd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 1 Mar 2014 18:48:17 +0100 Subject: [PATCH] omxvideodec: fix startup race condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reset function shouldn't start the src pad loop if it wasn't started before. Signed-off-by: Christian König --- omx/gstomxvideodec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index bf44b3d255..c2fbd8fc99 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -2735,6 +2735,9 @@ gst_omx_video_dec_reset (GstVideoDecoder * decoder, gboolean hard) GST_DEBUG_OBJECT (self, "Resetting decoder"); + if (gst_omx_component_get_state (self->dec, 0) == OMX_StateLoaded) + return TRUE; + gst_omx_port_set_flushing (self->dec_in_port, 5 * GST_SECOND, TRUE); gst_omx_port_set_flushing (self->dec_out_port, 5 * GST_SECOND, TRUE);