diff options
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)); |