Loading media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -309,7 +309,7 @@ void SoftAMR::onQueueFilled(OMX_U32 /* portIndex */) { BufferInfo *outInfo = *outQueue.begin(); OMX_BUFFERHEADERTYPE *outHeader = outInfo->mHeader; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { if ((inHeader->nFlags & OMX_BUFFERFLAG_EOS) && inHeader->nFilledLen == 0) { inQueue.erase(inQueue.begin()); inInfo->mOwnedByUs = false; notifyEmptyBufferDone(inHeader); Loading Loading @@ -471,7 +471,7 @@ void SoftAMR::onQueueFilled(OMX_U32 /* portIndex */) { mNumSamplesOutput += kNumSamplesPerFrameWB; } if (inHeader->nFilledLen == 0) { if (inHeader->nFilledLen == 0 && (inHeader->nFlags & OMX_BUFFERFLAG_EOS) == 0) { inInfo->mOwnedByUs = false; inQueue.erase(inQueue.begin()); inInfo = NULL; Loading media/libstagefright/codecs/g711/dec/SoftG711.cpp +10 −6 Original line number Diff line number Diff line Loading @@ -219,7 +219,7 @@ void SoftG711::onQueueFilled(OMX_U32 /* portIndex */) { BufferInfo *outInfo = *outQueue.begin(); OMX_BUFFERHEADERTYPE *outHeader = outInfo->mHeader; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { if ((inHeader->nFlags & OMX_BUFFERFLAG_EOS) && inHeader->nFilledLen == 0) { inQueue.erase(inQueue.begin()); inInfo->mOwnedByUs = false; notifyEmptyBufferDone(inHeader); Loading Loading @@ -266,11 +266,15 @@ void SoftG711::onQueueFilled(OMX_U32 /* portIndex */) { outHeader->nFilledLen = inHeader->nFilledLen * sizeof(int16_t); outHeader->nFlags = 0; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { inHeader->nFilledLen = 0; } else { inInfo->mOwnedByUs = false; inQueue.erase(inQueue.begin()); inInfo = NULL; notifyEmptyBufferDone(inHeader); inHeader = NULL; } outInfo->mOwnedByUs = false; outQueue.erase(outQueue.begin()); Loading media/libstagefright/codecs/gsm/dec/SoftGSM.cpp +10 −6 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ void SoftGSM::onQueueFilled(OMX_U32 /* portIndex */) { BufferInfo *outInfo = *outQueue.begin(); OMX_BUFFERHEADERTYPE *outHeader = outInfo->mHeader; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { if ((inHeader->nFlags & OMX_BUFFERFLAG_EOS) && inHeader->nFilledLen == 0) { inQueue.erase(inQueue.begin()); inInfo->mOwnedByUs = false; notifyEmptyBufferDone(inHeader); Loading Loading @@ -246,11 +246,15 @@ void SoftGSM::onQueueFilled(OMX_U32 /* portIndex */) { outHeader->nFilledLen = n * sizeof(int16_t); outHeader->nFlags = 0; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { inHeader->nFilledLen = 0; } else { inInfo->mOwnedByUs = false; inQueue.erase(inQueue.begin()); inInfo = NULL; notifyEmptyBufferDone(inHeader); inHeader = NULL; } outInfo->mOwnedByUs = false; outQueue.erase(outQueue.begin()); Loading media/libstagefright/codecs/opus/dec/SoftOpus.cpp +21 −6 Original line number Diff line number Diff line Loading @@ -350,6 +350,11 @@ void SoftOpus::onQueueFilled(OMX_U32 portIndex) { const uint8_t *data = header->pBuffer + header->nOffset; size_t size = header->nFilledLen; if ((header->nFlags & OMX_BUFFERFLAG_EOS) && size == 0) { header->nFlags &= ~OMX_BUFFERFLAG_CODECCONFIG; goto L_eos; } if (mInputBufferCount == 0) { CHECK(mHeader == NULL); mHeader = new OpusHeader(); Loading Loading @@ -408,6 +413,11 @@ void SoftOpus::onQueueFilled(OMX_U32 portIndex) { mOutputPortSettingsChange = AWAITING_DISABLED; } if (header->nFlags & OMX_BUFFERFLAG_EOS) { header->nFilledLen = 0; header->nFlags &= ~OMX_BUFFERFLAG_CODECCONFIG; goto L_eos; } inQueue.erase(inQueue.begin()); info->mOwnedByUs = false; notifyEmptyBufferDone(header); Loading @@ -415,6 +425,7 @@ void SoftOpus::onQueueFilled(OMX_U32 portIndex) { return; } L_eos: while (!inQueue.empty() && !outQueue.empty()) { BufferInfo *inInfo = *inQueue.begin(); OMX_BUFFERHEADERTYPE *inHeader = inInfo->mHeader; Loading @@ -430,7 +441,7 @@ void SoftOpus::onQueueFilled(OMX_U32 portIndex) { BufferInfo *outInfo = *outQueue.begin(); OMX_BUFFERHEADERTYPE *outHeader = outInfo->mHeader; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { if ((inHeader->nFlags & OMX_BUFFERFLAG_EOS) && inHeader->nFilledLen == 0) { inQueue.erase(inQueue.begin()); inInfo->mOwnedByUs = false; notifyEmptyBufferDone(inHeader); Loading Loading @@ -498,11 +509,15 @@ void SoftOpus::onQueueFilled(OMX_U32 portIndex) { mNumFramesOutput += numFrames; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { inHeader->nFilledLen = 0; } else { inInfo->mOwnedByUs = false; inQueue.erase(inQueue.begin()); inInfo = NULL; notifyEmptyBufferDone(inHeader); inHeader = NULL; } outInfo->mOwnedByUs = false; outQueue.erase(outQueue.begin()); Loading media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -276,6 +276,11 @@ void SoftVorbis::onQueueFilled(OMX_U32 portIndex) { const uint8_t *data = header->pBuffer + header->nOffset; size_t size = header->nFilledLen; if ((header->nFlags & OMX_BUFFERFLAG_EOS) && size == 0) { goto L_eos; } if (size < 7) { ALOGE("Too small input buffer: %zu bytes", size); android_errorWriteLog(0x534e4554, "27833616"); Loading Loading @@ -323,6 +328,11 @@ void SoftVorbis::onQueueFilled(OMX_U32 portIndex) { } } if (header->nFlags & OMX_BUFFERFLAG_EOS) { header->nFilledLen = 0; goto L_eos; } inQueue.erase(inQueue.begin()); info->mOwnedByUs = false; notifyEmptyBufferDone(header); Loading @@ -332,6 +342,7 @@ void SoftVorbis::onQueueFilled(OMX_U32 portIndex) { return; } L_eos: while ((!inQueue.empty() || (mSawInputEos && !mSignalledOutputEos)) && !outQueue.empty()) { BufferInfo *inInfo = NULL; OMX_BUFFERHEADERTYPE *inHeader = NULL; Loading Loading
media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -309,7 +309,7 @@ void SoftAMR::onQueueFilled(OMX_U32 /* portIndex */) { BufferInfo *outInfo = *outQueue.begin(); OMX_BUFFERHEADERTYPE *outHeader = outInfo->mHeader; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { if ((inHeader->nFlags & OMX_BUFFERFLAG_EOS) && inHeader->nFilledLen == 0) { inQueue.erase(inQueue.begin()); inInfo->mOwnedByUs = false; notifyEmptyBufferDone(inHeader); Loading Loading @@ -471,7 +471,7 @@ void SoftAMR::onQueueFilled(OMX_U32 /* portIndex */) { mNumSamplesOutput += kNumSamplesPerFrameWB; } if (inHeader->nFilledLen == 0) { if (inHeader->nFilledLen == 0 && (inHeader->nFlags & OMX_BUFFERFLAG_EOS) == 0) { inInfo->mOwnedByUs = false; inQueue.erase(inQueue.begin()); inInfo = NULL; Loading
media/libstagefright/codecs/g711/dec/SoftG711.cpp +10 −6 Original line number Diff line number Diff line Loading @@ -219,7 +219,7 @@ void SoftG711::onQueueFilled(OMX_U32 /* portIndex */) { BufferInfo *outInfo = *outQueue.begin(); OMX_BUFFERHEADERTYPE *outHeader = outInfo->mHeader; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { if ((inHeader->nFlags & OMX_BUFFERFLAG_EOS) && inHeader->nFilledLen == 0) { inQueue.erase(inQueue.begin()); inInfo->mOwnedByUs = false; notifyEmptyBufferDone(inHeader); Loading Loading @@ -266,11 +266,15 @@ void SoftG711::onQueueFilled(OMX_U32 /* portIndex */) { outHeader->nFilledLen = inHeader->nFilledLen * sizeof(int16_t); outHeader->nFlags = 0; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { inHeader->nFilledLen = 0; } else { inInfo->mOwnedByUs = false; inQueue.erase(inQueue.begin()); inInfo = NULL; notifyEmptyBufferDone(inHeader); inHeader = NULL; } outInfo->mOwnedByUs = false; outQueue.erase(outQueue.begin()); Loading
media/libstagefright/codecs/gsm/dec/SoftGSM.cpp +10 −6 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ void SoftGSM::onQueueFilled(OMX_U32 /* portIndex */) { BufferInfo *outInfo = *outQueue.begin(); OMX_BUFFERHEADERTYPE *outHeader = outInfo->mHeader; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { if ((inHeader->nFlags & OMX_BUFFERFLAG_EOS) && inHeader->nFilledLen == 0) { inQueue.erase(inQueue.begin()); inInfo->mOwnedByUs = false; notifyEmptyBufferDone(inHeader); Loading Loading @@ -246,11 +246,15 @@ void SoftGSM::onQueueFilled(OMX_U32 /* portIndex */) { outHeader->nFilledLen = n * sizeof(int16_t); outHeader->nFlags = 0; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { inHeader->nFilledLen = 0; } else { inInfo->mOwnedByUs = false; inQueue.erase(inQueue.begin()); inInfo = NULL; notifyEmptyBufferDone(inHeader); inHeader = NULL; } outInfo->mOwnedByUs = false; outQueue.erase(outQueue.begin()); Loading
media/libstagefright/codecs/opus/dec/SoftOpus.cpp +21 −6 Original line number Diff line number Diff line Loading @@ -350,6 +350,11 @@ void SoftOpus::onQueueFilled(OMX_U32 portIndex) { const uint8_t *data = header->pBuffer + header->nOffset; size_t size = header->nFilledLen; if ((header->nFlags & OMX_BUFFERFLAG_EOS) && size == 0) { header->nFlags &= ~OMX_BUFFERFLAG_CODECCONFIG; goto L_eos; } if (mInputBufferCount == 0) { CHECK(mHeader == NULL); mHeader = new OpusHeader(); Loading Loading @@ -408,6 +413,11 @@ void SoftOpus::onQueueFilled(OMX_U32 portIndex) { mOutputPortSettingsChange = AWAITING_DISABLED; } if (header->nFlags & OMX_BUFFERFLAG_EOS) { header->nFilledLen = 0; header->nFlags &= ~OMX_BUFFERFLAG_CODECCONFIG; goto L_eos; } inQueue.erase(inQueue.begin()); info->mOwnedByUs = false; notifyEmptyBufferDone(header); Loading @@ -415,6 +425,7 @@ void SoftOpus::onQueueFilled(OMX_U32 portIndex) { return; } L_eos: while (!inQueue.empty() && !outQueue.empty()) { BufferInfo *inInfo = *inQueue.begin(); OMX_BUFFERHEADERTYPE *inHeader = inInfo->mHeader; Loading @@ -430,7 +441,7 @@ void SoftOpus::onQueueFilled(OMX_U32 portIndex) { BufferInfo *outInfo = *outQueue.begin(); OMX_BUFFERHEADERTYPE *outHeader = outInfo->mHeader; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { if ((inHeader->nFlags & OMX_BUFFERFLAG_EOS) && inHeader->nFilledLen == 0) { inQueue.erase(inQueue.begin()); inInfo->mOwnedByUs = false; notifyEmptyBufferDone(inHeader); Loading Loading @@ -498,11 +509,15 @@ void SoftOpus::onQueueFilled(OMX_U32 portIndex) { mNumFramesOutput += numFrames; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { inHeader->nFilledLen = 0; } else { inInfo->mOwnedByUs = false; inQueue.erase(inQueue.begin()); inInfo = NULL; notifyEmptyBufferDone(inHeader); inHeader = NULL; } outInfo->mOwnedByUs = false; outQueue.erase(outQueue.begin()); Loading
media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -276,6 +276,11 @@ void SoftVorbis::onQueueFilled(OMX_U32 portIndex) { const uint8_t *data = header->pBuffer + header->nOffset; size_t size = header->nFilledLen; if ((header->nFlags & OMX_BUFFERFLAG_EOS) && size == 0) { goto L_eos; } if (size < 7) { ALOGE("Too small input buffer: %zu bytes", size); android_errorWriteLog(0x534e4554, "27833616"); Loading Loading @@ -323,6 +328,11 @@ void SoftVorbis::onQueueFilled(OMX_U32 portIndex) { } } if (header->nFlags & OMX_BUFFERFLAG_EOS) { header->nFilledLen = 0; goto L_eos; } inQueue.erase(inQueue.begin()); info->mOwnedByUs = false; notifyEmptyBufferDone(header); Loading @@ -332,6 +342,7 @@ void SoftVorbis::onQueueFilled(OMX_U32 portIndex) { return; } L_eos: while ((!inQueue.empty() || (mSawInputEos && !mSignalledOutputEos)) && !outQueue.empty()) { BufferInfo *inInfo = NULL; OMX_BUFFERHEADERTYPE *inHeader = NULL; Loading