diff options
author | Leo Liu <leo.liu@amd.com> | 2013-11-07 13:13:19 -0500 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2014-02-07 05:50:47 -0700 |
commit | c223d8863624a93cd969b421b302df5d74f7fbaf (patch) | |
tree | b79ec514b21e8fc0761f20220b3ab60c586db36e | |
parent | c44cd849400b90f5f4b1f4f429278d9685b1daca (diff) |
gstomxvideodec: fix multithreads negotiation problem v2
v2: update comment text
Signed-off-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
-rw-r--r-- | omx/gstomxvideodec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index bf44b3d..0d8801e 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -2675,6 +2675,11 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder, if (!gst_omx_video_dec_negotiate (self)) GST_LOG_OBJECT (self, "Negotiation failed, will get output format later"); + /* Make sure other threads are done enabling it */ + if (gst_omx_port_wait_enabled (self->dec_out_port, + 1 * GST_SECOND) != OMX_ErrorNone) + return FALSE; + /* Disable output port */ if (gst_omx_port_set_enabled (self->dec_out_port, FALSE) != OMX_ErrorNone) return FALSE; |