Merge "The mp3 decoder should not assert that decoding was successful but return an error instead."
This commit is contained in:
committed by
Android (Google) Code Review
commit
593c6a5516
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user