diff options
author | Wei Jia <wjia@google.com> | 2014-08-23 06:19:28 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-08-23 06:19:28 +0000 |
commit | 211aae92d3f48a56f266a2b933d6f53b625098b0 (patch) | |
tree | 19db8ad9a7883cb0ce58e1d230d076b0b77f4394 | |
parent | 008cee913577839d2377ff79bf4f26655c3a2c7d (diff) | |
parent | 848726d845b51da04364bdaf4ec915c85d593c0e (diff) | |
download | frameworks_av-211aae92d3f48a56f266a2b933d6f53b625098b0.zip frameworks_av-211aae92d3f48a56f266a2b933d6f53b625098b0.tar.gz frameworks_av-211aae92d3f48a56f266a2b933d6f53b625098b0.tar.bz2 |
am 848726d8: Merge "MediaCodec: handle errors during flushing." into lmp-dev
* commit '848726d845b51da04364bdaf4ec915c85d593c0e':
MediaCodec: handle errors during flushing.
-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 814adab..76f730f 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -722,7 +722,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { mFlags |= kFlagSawMediaServerDie; } - bool sendErrorReponse = true; + bool sendErrorResponse = true; switch (mState) { case INITIALIZING: @@ -749,7 +749,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 @@ -780,7 +780,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { case FLUSHED: case STARTED: { - sendErrorReponse = false; + sendErrorResponse = false; setStickyError(err); postActivityNotificationIfPossible(); @@ -805,7 +805,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { default: { - sendErrorReponse = false; + sendErrorResponse = false; setStickyError(err); postActivityNotificationIfPossible(); @@ -831,7 +831,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { } } - if (sendErrorReponse) { + if (sendErrorResponse) { PostReplyWithError(mReplyID, err); } break; @@ -1118,7 +1118,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); |