diff options
author | Andreas Huber <andih@google.com> | 2012-11-29 13:49:07 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2012-11-29 13:49:07 -0800 |
commit | f6f38287b97ec69b169387add6458f859b770e65 (patch) | |
tree | 8c4b338a96b7fa41e31f761aba17e0c710998131 /media | |
parent | f91a3abb7d136e75f0f5d999193b8c8297d97628 (diff) | |
download | frameworks_av-f6f38287b97ec69b169387add6458f859b770e65.zip frameworks_av-f6f38287b97ec69b169387add6458f859b770e65.tar.gz frameworks_av-f6f38287b97ec69b169387add6458f859b770e65.tar.bz2 |
Clear the sticky EOS flags when transitioning to LOADED state
instead of transitioning _from_ UNINITIALIZED state. This makes codec instances
reusable.
Change-Id: I8f0c11923978ffee58b553a5ac59c740b0223c54
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/ACodec.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index a135222..8f3dc6c 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -3106,11 +3106,6 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) { mCodec->mOMX = omx; mCodec->mNode = node; - mCodec->mPortEOS[kPortIndexInput] = - mCodec->mPortEOS[kPortIndexOutput] = false; - - mCodec->mInputEOSResult = OK; - { sp<AMessage> notify = mCodec->mNotify->dup(); notify->setInt32("what", ACodec::kWhatComponentAllocated); @@ -3132,6 +3127,11 @@ ACodec::LoadedState::LoadedState(ACodec *codec) void ACodec::LoadedState::stateEntered() { ALOGV("[%s] Now Loaded", mCodec->mComponentName.c_str()); + mCodec->mPortEOS[kPortIndexInput] = + mCodec->mPortEOS[kPortIndexOutput] = false; + + mCodec->mInputEOSResult = OK; + if (mCodec->mShutdownInProgress) { bool keepComponentAllocated = mCodec->mKeepComponentAllocated; |