summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2015-07-07 14:29:25 -0700
committerWei Jia <wjia@google.com>2015-07-08 15:04:51 -0700
commitfd866b3aa0d97375de08f8888b95669026c83361 (patch)
tree8eeac1f0b7874d5c1daaea951134ccbcd2b151f9 /media/libstagefright/omx
parent065f6572752dca646b7d60df8e80b6d4ac159281 (diff)
downloadframeworks_av-fd866b3aa0d97375de08f8888b95669026c83361.zip
frameworks_av-fd866b3aa0d97375de08f8888b95669026c83361.tar.gz
frameworks_av-fd866b3aa0d97375de08f8888b95669026c83361.tar.bz2
SimpleSoftOMXComponent: change CHECK to error notification.
SoftAVCDec, SoftMPEG4: fix handling of zero-byte input buffer. ACodec: do not send empty input buffer without EOS to the omx component. Bug: 22199127 Change-Id: I0bbcf5778f969ba6e30d0db31770c4289e2b64a4
Diffstat (limited to 'media/libstagefright/omx')
-rw-r--r--media/libstagefright/omx/SimpleSoftOMXComponent.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/media/libstagefright/omx/SimpleSoftOMXComponent.cpp b/media/libstagefright/omx/SimpleSoftOMXComponent.cpp
index 04303c4..e6a0c49 100644
--- a/media/libstagefright/omx/SimpleSoftOMXComponent.cpp
+++ b/media/libstagefright/omx/SimpleSoftOMXComponent.cpp
@@ -505,7 +505,15 @@ void SimpleSoftOMXComponent::onPortFlush(
CHECK_LT(portIndex, mPorts.size());
PortInfo *port = &mPorts.editItemAt(portIndex);
- CHECK_EQ((int)port->mTransition, (int)PortInfo::NONE);
+ // Ideally, the port should not in transitioning state when flushing.
+ // However, in error handling case, e.g., the client can't allocate buffers
+ // when it tries to re-enable the port, the port will be stuck in ENABLING.
+ // The client will then transition the component from Executing to Idle,
+ // which leads to flushing ports. At this time, it should be ok to notify
+ // the client of the error and still clear all buffers on the port.
+ if (port->mTransition != PortInfo::NONE) {
+ notify(OMX_EventError, OMX_ErrorUndefined, 0, 0);
+ }
for (size_t i = 0; i < port->mBuffers.size(); ++i) {
BufferInfo *buffer = &port->mBuffers.editItemAt(i);