diff options
author | Wei Jia <wjia@google.com> | 2015-07-07 14:29:25 -0700 |
---|---|---|
committer | Wei Jia <wjia@google.com> | 2015-07-08 15:04:51 -0700 |
commit | fd866b3aa0d97375de08f8888b95669026c83361 (patch) | |
tree | 8eeac1f0b7874d5c1daaea951134ccbcd2b151f9 /media/libstagefright/codecs/avcdec/SoftAVCDec.cpp | |
parent | 065f6572752dca646b7d60df8e80b6d4ac159281 (diff) | |
download | frameworks_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/codecs/avcdec/SoftAVCDec.cpp')
-rw-r--r-- | media/libstagefright/codecs/avcdec/SoftAVCDec.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/avcdec/SoftAVCDec.cpp b/media/libstagefright/codecs/avcdec/SoftAVCDec.cpp index f3af777..8cf6b1f 100644 --- a/media/libstagefright/codecs/avcdec/SoftAVCDec.cpp +++ b/media/libstagefright/codecs/avcdec/SoftAVCDec.cpp @@ -627,6 +627,11 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) { if (!inQueue.empty()) { inInfo = *inQueue.begin(); inHeader = inInfo->mHeader; + if (inHeader == NULL) { + inQueue.erase(inQueue.begin()); + inInfo->mOwnedByUs = false; + continue; + } } else { break; } @@ -638,14 +643,21 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) { outHeader->nTimeStamp = 0; outHeader->nOffset = 0; - if (inHeader != NULL && (inHeader->nFlags & OMX_BUFFERFLAG_EOS)) { - mReceivedEOS = true; + if (inHeader != NULL) { if (inHeader->nFilledLen == 0) { inQueue.erase(inQueue.begin()); inInfo->mOwnedByUs = false; notifyEmptyBufferDone(inHeader); + + if (!(inHeader->nFlags & OMX_BUFFERFLAG_EOS)) { + continue; + } + + mReceivedEOS = true; inHeader = NULL; setFlushMode(); + } else if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { + mReceivedEOS = true; } } |