summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2013-04-04 15:37:21 -0700
committerMarco Nelissen <marcone@google.com>2013-04-04 15:37:21 -0700
commit488bf2281134c549fcc9ffcec7bda9690c2d5617 (patch)
tree52aec002ecf04dd66c8e6aae83d87d387ef99bf8 /media
parentcba6b7dbe6e6d89c00021a0954d8bf60eacefdfa (diff)
downloadframeworks_av-488bf2281134c549fcc9ffcec7bda9690c2d5617.zip
frameworks_av-488bf2281134c549fcc9ffcec7bda9690c2d5617.tar.gz
frameworks_av-488bf2281134c549fcc9ffcec7bda9690c2d5617.tar.bz2
Make sure resume() and flush() are handled appropriately even if the codec
is in Loaded->Idle state. b/8347958 Change-Id: Ic14d29502a7effc636251379bb1bbc25739db98e
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/ACodec.cpp15
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);
}