diff options
author | Marco Nelissen <marcone@google.com> | 2014-09-17 22:08:10 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-17 22:08:10 +0000 |
commit | 999b888f07f4549b1f8490d7153e3b1704684ca2 (patch) | |
tree | a0548a117eafd884e8e64443af683f35909112bd /media/libstagefright | |
parent | 3a6a0f9daa766b280326c7f6007dd388a71fbccb (diff) | |
parent | 9b7db1c57ff2a3f854568dd61fcec82ff63addeb (diff) | |
download | frameworks_av-999b888f07f4549b1f8490d7153e3b1704684ca2.zip frameworks_av-999b888f07f4549b1f8490d7153e3b1704684ca2.tar.gz frameworks_av-999b888f07f4549b1f8490d7153e3b1704684ca2.tar.bz2 |
Merge "Fix null pointer dereference" into lmp-dev
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/codecs/aacdec/SoftAAC2.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp index 4569c1c..456be89 100644 --- a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp +++ b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp @@ -705,7 +705,9 @@ void SoftAAC2::onQueueFilled(OMX_U32 /* portIndex */) { } // Discard input buffer. - inHeader->nFilledLen = 0; + if (inHeader) { + inHeader->nFilledLen = 0; + } aacDecoder_SetParam(mAACDecoder, AAC_TPDEC_CLEAR_BUFFER, 1); @@ -736,7 +738,7 @@ void SoftAAC2::onQueueFilled(OMX_U32 /* portIndex */) { notify(OMX_EventPortSettingsChanged, 1, 0, NULL); mOutputPortSettingsChange = AWAITING_DISABLED; - if (inHeader->nFilledLen == 0) { + if (inHeader && inHeader->nFilledLen == 0) { inInfo->mOwnedByUs = false; mInputBufferCount++; inQueue.erase(inQueue.begin()); |