diff options
author | Marco Nelissen <marcone@google.com> | 2014-08-20 20:16:59 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-19 02:43:23 +0000 |
commit | 111333eaab12448f45927464c8aeacbbf9a578a1 (patch) | |
tree | 845d25bdc67513f1f0292a0d66242a7fb73e5dda /media/libstagefright/MediaCodec.cpp | |
parent | 4deb606bca47f971f1ca05e44b934c5328cfb6b7 (diff) | |
parent | 9e2b7918eb5621b24bd54c922f630da45339de77 (diff) | |
download | frameworks_av-111333eaab12448f45927464c8aeacbbf9a578a1.zip frameworks_av-111333eaab12448f45927464c8aeacbbf9a578a1.tar.gz frameworks_av-111333eaab12448f45927464c8aeacbbf9a578a1.tar.bz2 |
Merge "handle error during flush in MediaPlayer.reset()" into lmp-dev
Diffstat (limited to 'media/libstagefright/MediaCodec.cpp')
-rw-r--r-- | media/libstagefright/MediaCodec.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index 7bb7ed9..814adab 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -716,7 +716,8 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { CHECK(msg->findInt32("err", &err)); CHECK(msg->findInt32("actionCode", &actionCode)); - ALOGE("Codec reported err %#x, actionCode %d", err, actionCode); + ALOGE("Codec reported err %#x, actionCode %d, while in state %d", + err, actionCode, mState); if (err == DEAD_OBJECT) { mFlags |= kFlagSawMediaServerDie; } @@ -767,8 +768,12 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { case FLUSHING: { - setState( - (mFlags & kFlagIsAsync) ? FLUSHED : STARTED); + if (actionCode == ACTION_CODE_FATAL) { + setState(UNINITIALIZED); + } else { + setState( + (mFlags & kFlagIsAsync) ? FLUSHED : STARTED); + } break; } |