diff options
author | Andreas Huber <andih@google.com> | 2010-01-11 14:21:26 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-01-11 14:21:26 -0800 |
commit | cd231c8672056429003b452c6a97fb705ad0765e (patch) | |
tree | d6c9b98085d45bf4a0a2208599b492e7b673c958 /media | |
parent | 67e5a4f6f6879d512a859e5dba92e9beec7a2f91 (diff) | |
download | frameworks_av-cd231c8672056429003b452c6a97fb705ad0765e.zip frameworks_av-cd231c8672056429003b452c6a97fb705ad0765e.tar.gz frameworks_av-cd231c8672056429003b452c6a97fb705ad0765e.tar.bz2 |
The mp3 decoder should not assert that decoding was successful but return an error instead.
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/codecs/mp3dec/MP3Decoder.cpp | 7 |
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)); |