diff options
author | Mingming Yin <mingming@codeaurora.org> | 2014-09-08 17:09:56 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:24:30 -0600 |
commit | 2aa016c2d02857629ece0aaec742c8c5ac211a8c (patch) | |
tree | 8e7c107c81361f1da42bf607daefab0690e3b7ec | |
parent | 0c4d3ced0a20b5cef6c51410754b40d4254f596b (diff) | |
download | frameworks_av-2aa016c2d02857629ece0aaec742c8c5ac211a8c.zip frameworks_av-2aa016c2d02857629ece0aaec742c8c5ac211a8c.tar.gz frameworks_av-2aa016c2d02857629ece0aaec742c8c5ac211a8c.tar.bz2 |
stagefright: Fix to play a specific Mp4 clip due to SYNCH_LOST_ERROR.
- Unable to play a Specific Mp4 clip.
- Mp3 playback is stopped if the Decoder errors out with SYNCH_LOST_ERROR.
- Ignore the frame with SYNCH_LOST_ERROR and play silence instead.
Change-Id: I6b94a83cf89e8bc6792d8ee3804042d629aa505b
-rw-r--r-- | media/libstagefright/codecs/mp3dec/SoftMP3.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp index f743b1c..aeaea81 100644 --- a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp +++ b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp @@ -112,7 +112,7 @@ void SoftMP3::initPorts() { void SoftMP3::initDecoder() { mConfig->equalizerType = flat; mConfig->crcEnabled = false; - + mConfig->samplingRate = mSamplingRate; uint32_t memRequirements = pvmp3_decoderMemRequirements(); mDecoderBuf = malloc(memRequirements); @@ -259,10 +259,13 @@ void SoftMP3::onQueueFilled(OMX_U32 /* portIndex */) { if (decoderErr != NO_ENOUGH_MAIN_DATA_ERROR && decoderErr != SIDE_INFO_ERROR) { ALOGE("mp3 decoder returned error %d", decoderErr); - - notify(OMX_EventError, OMX_ErrorUndefined, decoderErr, NULL); - mSignalledError = true; - return; + if(decoderErr == SYNCH_LOST_ERROR) { + mConfig->outputFrameSize = kOutputBufferSize / sizeof(int16_t); + } else { + notify(OMX_EventError, OMX_ErrorUndefined, decoderErr, NULL); + mSignalledError = true; + return; + } } if (mConfig->outputFrameSize == 0) { |