diff options
author | sameer <sameer.kibey@intel.com> | 2013-10-30 06:55:13 -0700 |
---|---|---|
committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 22:03:42 -0700 |
commit | 43d2bde2a903886197f00f077218f13014bf8373 (patch) | |
tree | 2cc79d041b33b054afcf81762cae21a9242a9266 /base | |
parent | 35ff01df238a01bfef109b68eb68a82de8722c5f (diff) | |
download | wrs_omxil_core-43d2bde2a903886197f00f077218f13014bf8373.tar.gz |
[wrs_core]Fix hang when port disable called for empty port.
BZ: 148867
This issue was found when using gstreamer with Intel OMX Core
using the gst-omx plugin. In gst-omx playback, when transitioning
component to idle state the output port is disabled. The call to
disable output port hangs in WaitPortBufferCompletion() in the OMX
IL Core. This is due to a bug where WaitPortBufferCompletion() waits for
buffer free operation to complete on an empty port. Since port
is empty buffer free will never be called. Added check on buffer
count before doing the wait to avoid the hang.
Change-Id: If34c3388be978bcec5d33100858d343468d835f9
Signed-off-by: Sameer Kibey <sameer.kibey@intel.com>
Diffstat (limited to 'base')
-rw-r--r-- | base/src/portbase.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/base/src/portbase.cpp b/base/src/portbase.cpp index 228cb84..a0b7654 100644 --- a/base/src/portbase.cpp +++ b/base/src/portbase.cpp @@ -956,8 +956,12 @@ OMX_ERRORTYPE PortBase::TransState(OMX_U8 transition) portdefinition.bEnabled = OMX_TRUE; } else if(transition == OMX_PortDisabled) { - FlushPort(); - WaitPortBufferCompletion(); + /*need to flush only if port is not empty*/ + if (nr_buffer_hdrs) + { + FlushPort(); + WaitPortBufferCompletion(); + } portdefinition.bEnabled = OMX_FALSE; } else { |