diff options
author | Wei Jia <wjia@google.com> | 2014-08-25 08:23:27 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-08-25 08:23:27 +0000 |
commit | f5dea40eefb085b74ee37a548a51ade2ff10d150 (patch) | |
tree | 95a6e576ca49c2eed1daf91e205abc8dc3e42f28 /media | |
parent | 5b85cf56f1c0ce4f41431aec929f3405a9c8abd4 (diff) | |
parent | 211aae92d3f48a56f266a2b933d6f53b625098b0 (diff) | |
download | frameworks_av-f5dea40eefb085b74ee37a548a51ade2ff10d150.zip frameworks_av-f5dea40eefb085b74ee37a548a51ade2ff10d150.tar.gz frameworks_av-f5dea40eefb085b74ee37a548a51ade2ff10d150.tar.bz2 |
am 211aae92: am 848726d8: Merge "MediaCodec: handle errors during flushing." into lmp-dev
* commit '211aae92d3f48a56f266a2b933d6f53b625098b0':
MediaCodec: handle errors during flushing.
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/MediaCodec.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index cf24f6d..91aa9ab 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -732,7 +732,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { mFlags |= kFlagSawMediaServerDie; } - bool sendErrorReponse = true; + bool sendErrorResponse = true; switch (mState) { case INITIALIZING: @@ -759,7 +759,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { // Ignore the error, assuming we'll still get // the shutdown complete notification. - sendErrorReponse = false; + sendErrorResponse = false; if (mFlags & kFlagSawMediaServerDie) { // MediaServer died, there definitely won't @@ -790,7 +790,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { case FLUSHED: case STARTED: { - sendErrorReponse = false; + sendErrorResponse = false; setStickyError(err); postActivityNotificationIfPossible(); @@ -815,7 +815,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { default: { - sendErrorReponse = false; + sendErrorResponse = false; setStickyError(err); postActivityNotificationIfPossible(); @@ -841,7 +841,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { } } - if (sendErrorReponse) { + if (sendErrorResponse) { PostReplyWithError(mReplyID, err); } break; @@ -1128,7 +1128,11 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { case CodecBase::kWhatFlushCompleted: { - CHECK_EQ(mState, FLUSHING); + if (mState != FLUSHING) { + ALOGW("received FlushCompleted message in state %d", + mState); + break; + } if (mFlags & kFlagIsAsync) { setState(FLUSHED); |