diff options
author | Marco Nelissen <marcone@google.com> | 2013-04-04 15:37:21 -0700 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2013-04-04 15:37:21 -0700 |
commit | 6463e76d41430f9b03a79b221de84255f2475658 (patch) | |
tree | fcddbfa994666f78962c4e1974ed211679ff18e8 | |
parent | ec24fa46443634cd29627182c5812ccf43682692 (diff) | |
download | frameworks_av-6463e76d41430f9b03a79b221de84255f2475658.zip frameworks_av-6463e76d41430f9b03a79b221de84255f2475658.tar.gz frameworks_av-6463e76d41430f9b03a79b221de84255f2475658.tar.bz2 |
Make sure resume() and flush() are handled appropriately even if the codec
is in Loaded->Idle state.
b/8347958
Change-Id: Ic14d29502a7effc636251379bb1bbc25739db98e
-rw-r--r-- | media/libstagefright/ACodec.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index c9f8741..ff72b71 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -3416,6 +3416,21 @@ bool ACodec::LoadedToIdleState::onMessageReceived(const sp<AMessage> &msg) { return true; } + case kWhatResume: + { + // We'll be active soon enough. + return true; + } + + case kWhatFlush: + { + // We haven't even started yet, so we're flushed alright... + sp<AMessage> notify = mCodec->mNotify->dup(); + notify->setInt32("what", ACodec::kWhatFlushCompleted); + notify->post(); + return true; + } + default: return BaseState::onMessageReceived(msg); } |