summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp')
-rw-r--r--media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp b/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp
index a9723ea..f8316fd 100644
--- a/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp
+++ b/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp
@@ -352,7 +352,14 @@ void SoftAMR::onQueueFilled(OMX_U32 /* portIndex */) {
}
size_t frameSize = getFrameSize(mode);
- CHECK_GE(inHeader->nFilledLen, frameSize);
+ if (inHeader->nFilledLen < frameSize) {
+ ALOGE("Filled length vs frameSize %u vs %lu. Corrupt clip?",
+ inHeader->nFilledLen, frameSize);
+
+ notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL);
+ mSignalledError = true;
+ return;
+ }
int16_t *outPtr = (int16_t *)outHeader->pBuffer;