diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-03-18 02:08:46 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-03-18 02:08:46 +0100 |
commit | 185e2110a53feb7720d91b6f8366ad27402f21cc (patch) | |
tree | a265317b5846eec34d7c87b494ede81857e6c2d3 /media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp | |
parent | d4590dda7776ec99e4e879c47b3372a5f4b13dcd (diff) | |
parent | 8c2e9d8867ccaba1a617f133b37103e2ac77e871 (diff) | |
download | frameworks_av-185e2110a53feb7720d91b6f8366ad27402f21cc.zip frameworks_av-185e2110a53feb7720d91b6f8366ad27402f21cc.tar.gz frameworks_av-185e2110a53feb7720d91b6f8366ad27402f21cc.tar.bz2 |
Merge branch 'cm-13.0' of https://github.com/CyanogenMod/android_frameworks_av into replicant-6.0
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Diffstat (limited to 'media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp')
-rw-r--r-- | media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp index 3dc549e..08200c1 100644 --- a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp +++ b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp @@ -56,7 +56,8 @@ SoftVorbis::SoftVorbis( mNumFramesLeftOnPage(-1), mSawInputEos(false), mSignalledOutputEos(false), - mOutputPortSettingsChange(NONE) { + mOutputPortSettingsChange(NONE), + mSignalledError(false) { initPorts(); CHECK_EQ(initDecoder(), (status_t)OK); } @@ -251,10 +252,21 @@ void SoftVorbis::onQueueFilled(OMX_U32 portIndex) { return; } + if (mSignalledError) { + return; + } + if (portIndex == 0 && mInputBufferCount < 2) { BufferInfo *info = *inQueue.begin(); OMX_BUFFERHEADERTYPE *header = info->mHeader; + if (!header || !header->pBuffer) { + ALOGE("b/25727575 has happened. report error"); + notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL); + mSignalledError = true; + return; + } + const uint8_t *data = header->pBuffer + header->nOffset; size_t size = header->nFilledLen; |