diff options
| author | Andy Hung <hunga@google.com> | 2015-06-19 22:57:52 +0000 | 
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-19 22:57:52 +0000 | 
| commit | 9a92255484adef1ae82f4c77d654ad47997c0439 (patch) | |
| tree | 636ef4440a528baddd9699c515e2fa408a1a98f8 | |
| parent | eee9697a910c664d2721ef3fcf4e1fad4263466d (diff) | |
| parent | c6044a135324979e62cc59db9dbde8b11c4bb74b (diff) | |
| download | frameworks_av-9a92255484adef1ae82f4c77d654ad47997c0439.zip frameworks_av-9a92255484adef1ae82f4c77d654ad47997c0439.tar.gz frameworks_av-9a92255484adef1ae82f4c77d654ad47997c0439.tar.bz2  | |
Merge "MediaCodec: handle a spontaneous error while configuring" into mnc-dev
| -rw-r--r-- | media/libstagefright/MediaCodec.cpp | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index e5b7202..b576cd9 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -1160,6 +1160,12 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {                  case CodecBase::kWhatComponentConfigured:                  { +                    if (mState == UNINITIALIZED || mState == INITIALIZED) { +                        // In case a kWhatError message came in and replied with error, +                        // we log a warning and ignore. +                        ALOGW("configure interrupted by error, current state %d", mState); +                        break; +                    }                      CHECK_EQ(mState, CONFIGURING);                      // reset input surface flag  | 
