Loading media/libstagefright/codecs/aacdec/SoftAAC.cpp +25 −19 Original line number Diff line number Diff line Loading @@ -378,6 +378,11 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) { // fall through } if (decoderErr == MP4AUDEC_SUCCESS || mNumSamplesOutput > 0) { // We'll only output data if we successfully decoded it or // we've previously decoded valid data, in the latter case // (decode failed) we'll output a silent frame. if (mUpsamplingFactor == 2) { if (mConfig->desiredChannels == 1) { memcpy(&mConfig->pOutputBuffer[1024], Loading @@ -396,6 +401,13 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) { mNumSamplesOutput += mConfig->frameLength * mUpsamplingFactor; outInfo->mOwnedByUs = false; outQueue.erase(outQueue.begin()); outInfo = NULL; notifyFillBufferDone(outHeader); outHeader = NULL; } if (inHeader->nFilledLen == 0) { inInfo->mOwnedByUs = false; inQueue.erase(inQueue.begin()); Loading @@ -404,12 +416,6 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) { inHeader = NULL; } outInfo->mOwnedByUs = false; outQueue.erase(outQueue.begin()); outInfo = NULL; notifyFillBufferDone(outHeader); outHeader = NULL; if (decoderErr == MP4AUDEC_SUCCESS) { ++mInputBufferCount; } Loading Loading
media/libstagefright/codecs/aacdec/SoftAAC.cpp +25 −19 Original line number Diff line number Diff line Loading @@ -378,6 +378,11 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) { // fall through } if (decoderErr == MP4AUDEC_SUCCESS || mNumSamplesOutput > 0) { // We'll only output data if we successfully decoded it or // we've previously decoded valid data, in the latter case // (decode failed) we'll output a silent frame. if (mUpsamplingFactor == 2) { if (mConfig->desiredChannels == 1) { memcpy(&mConfig->pOutputBuffer[1024], Loading @@ -396,6 +401,13 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) { mNumSamplesOutput += mConfig->frameLength * mUpsamplingFactor; outInfo->mOwnedByUs = false; outQueue.erase(outQueue.begin()); outInfo = NULL; notifyFillBufferDone(outHeader); outHeader = NULL; } if (inHeader->nFilledLen == 0) { inInfo->mOwnedByUs = false; inQueue.erase(inQueue.begin()); Loading @@ -404,12 +416,6 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) { inHeader = NULL; } outInfo->mOwnedByUs = false; outQueue.erase(outQueue.begin()); outInfo = NULL; notifyFillBufferDone(outHeader); outHeader = NULL; if (decoderErr == MP4AUDEC_SUCCESS) { ++mInputBufferCount; } Loading