diff options
author | Christian König <christian.koenig@amd.com> | 2014-03-01 18:48:17 +0100 |
---|---|---|
committer | Leo Liu <leo.liu@amd.com> | 2014-03-03 16:00:00 -0500 |
commit | c79c13c43e4d535fdb0c7fc508a7d5219eebe940 (patch) | |
tree | ebd62d6985d86224899fa0793de5427aecf266a0 | |
parent | 8e089ae8249899b8e47cbe7abfe3dd8814458c89 (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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index e8813fb..00f3951 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -2703,6 +2703,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); |