summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2014-03-01 18:48:17 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-03-02 12:08:09 +0100
commit0a8cfcde877b50a06a64f7ded4807707edeb1cd9 (patch)
tree00e84aa44a0eb8a2a27ca21732d31db1de40d11c
parent289ecfe35c33c2b5eca9f31a2fc9e50caac637df (diff)
omxvideodec: fix startup race condition
The reset function shouldn't start the src pad loop if it wasn't started before. Signed-off-by: Christian König <christian.koenig@amd.com>
-rw-r--r--omx/gstomxvideodec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index bf44b3d..c2fbd8f 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);