aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorywan171 <yi.a.wang@intel.com>2013-02-05 16:08:59 +0800
committerPatrick Tjin <pattjin@google.com>2014-07-21 22:03:41 -0700
commitfa824cac36baf4f5377f65a996a615b90c1558af (patch)
treeba87c5193840e143385601b5269cbf4e70b6dcf1
parent5427d9de992cd579c5757f70f8f1977390fb74d1 (diff)
downloadwrs_omxil_core-fa824cac36baf4f5377f65a996a615b90c1558af.tar.gz
Avoid adding quirk requires-loaded-to-idle-after-allocation in framework
BZ: 116413 Make sure buffers have been allocated before state changes to Idle. Signed-off-by: ywan171 <yi.a.wang@intel.com> Signed-off-by: Dan Liang <dan.liang@intel.com> Change-Id: If00ef93f565567faec99e0ad39fe525c0b0ca93d Reviewed-on: http://android.intel.com:8080/90231 Reviewed-by: Liang, Dan <dan.liang@intel.com> Reviewed-by: cactus <cactus@intel.com> Reviewed-by: Wang, Yi A <yi.a.wang@intel.com> Reviewed-by: Shi, PingX <pingx.shi@intel.com> Tested-by: Shi, PingX <pingx.shi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
-rw-r--r--base/src/componentbase.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/base/src/componentbase.cpp b/base/src/componentbase.cpp
index 2b0cbaf..190b545 100644
--- a/base/src/componentbase.cpp
+++ b/base/src/componentbase.cpp
@@ -1357,6 +1357,10 @@ inline OMX_ERRORTYPE ComponentBase::TransStateToIdle(OMX_STATETYPE current)
if (current == OMX_StateLoaded) {
OMX_U32 i;
+ for (i = 0; i < nr_ports; i++) {
+ if (ports[i]->IsEnabled())
+ ports[i]->WaitPortBufferCompletion();
+ }
ret = ProcessorInit();
if (ret != OMX_ErrorNone) {
@@ -1364,11 +1368,6 @@ inline OMX_ERRORTYPE ComponentBase::TransStateToIdle(OMX_STATETYPE current)
GetName(), GetWorkingRole(), ret);
goto out;
}
-
- for (i = 0; i < nr_ports; i++) {
- if (ports[i]->IsEnabled())
- ports[i]->WaitPortBufferCompletion();
- }
}
else if ((current == OMX_StatePause) || (current == OMX_StateExecuting)) {
pthread_mutex_lock(&ports_block);
@@ -1614,9 +1613,9 @@ void ComponentBase::TransStatePort(OMX_U32 port_index, OMX_U8 state)
if (state == PortBase::OMX_PortEnabled) {
data1 = OMX_CommandPortEnable;
ProcessorReset();
- }
- else
+ } else {
data1 = OMX_CommandPortDisable;
+ }
data2 = i;
}
else {