summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-01-11 16:08:56 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-01-11 16:08:56 -0800
commit58e1f78683d9230932c4d5bee53b79fc685b5995 (patch)
treedbe127f2a4329dd1b191f0b576dbe2a8dcc23a95 /media/libstagefright
parentdb74495dbf653a72018396607fae63946bed44ec (diff)
parentcd231c8672056429003b452c6a97fb705ad0765e (diff)
downloadframeworks_av-58e1f78683d9230932c4d5bee53b79fc685b5995.zip
frameworks_av-58e1f78683d9230932c4d5bee53b79fc685b5995.tar.gz
frameworks_av-58e1f78683d9230932c4d5bee53b79fc685b5995.tar.bz2
Merge "The mp3 decoder should not assert that decoding was successful but return an error instead."
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/codecs/mp3dec/MP3Decoder.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp b/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp
index 2f919c2..c115b18 100644
--- a/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp
+++ b/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp
@@ -160,7 +160,12 @@ status_t MP3Decoder::read(
mConfig->outputFrameSize = buffer->size() / sizeof(int16_t);
mConfig->pOutputBuffer = static_cast<int16_t *>(buffer->data());
- CHECK_EQ(pvmp3_framedecoder(mConfig, mDecoderBuf), NO_DECODING_ERROR);
+ if (pvmp3_framedecoder(mConfig, mDecoderBuf) != NO_DECODING_ERROR) {
+ mInputBuffer->release();
+ mInputBuffer = NULL;
+
+ return UNKNOWN_ERROR;
+ }
buffer->set_range(
0, mConfig->outputFrameSize * sizeof(int16_t));