diff options
author | Lajos Molnar <lajos@google.com> | 2014-03-31 12:30:01 -0700 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2014-03-31 17:14:22 -0700 |
commit | ec5f7cc4756d389505e761b9d803a1a3a46b64d7 (patch) | |
tree | 2ca458e4746c799bcc2f69c4d39606e46ec943b2 | |
parent | 5e184b0d12f1ec436246a391da8d9355cc21ee08 (diff) | |
download | frameworks_av-ec5f7cc4756d389505e761b9d803a1a3a46b64d7.zip frameworks_av-ec5f7cc4756d389505e761b9d803a1a3a46b64d7.tar.gz frameworks_av-ec5f7cc4756d389505e761b9d803a1a3a46b64d7.tar.bz2 |
MediaCodec: move to UNINITIALIZED state on codec error
ACodec moves to Uninitialized state after receiving codec error.
Make MediaCodec also move to the same state, so stop() and
release() will work correctly.
Bug: 13675112
Change-Id: I1c7e8b274f68345fc0e6a55c70dff6c7a4fb2e72
-rw-r--r-- | media/libstagefright/MediaCodec.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index e0419ca..601dccf 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -603,6 +603,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { postActivityNotificationIfPossible(); cancelPendingDequeueOperations(); + setState(UNINITIALIZED); break; } @@ -612,6 +613,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { mFlags |= kFlagStickyError; postActivityNotificationIfPossible(); + setState(UNINITIALIZED); break; } } |