diff options
author | Lajos Molnar <lajos@google.com> | 2013-09-12 09:12:54 -0700 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2013-09-12 10:58:46 -0700 |
commit | c38fcfba95f711e5738e4c72bd5499317a2f30d9 (patch) | |
tree | 480143734121726c9d02b74ce2fc5c7dff76f59a /media/libstagefright/ACodec.cpp | |
parent | efc4d4899e03fb8464017dd48539106cec2163de (diff) | |
download | frameworks_av-c38fcfba95f711e5738e4c72bd5499317a2f30d9.zip frameworks_av-c38fcfba95f711e5738e4c72bd5499317a2f30d9.tar.gz frameworks_av-c38fcfba95f711e5738e4c72bd5499317a2f30d9.tar.bz2 |
ACodec: fix flush/resume for decoder-output-meta-data mode
When in decoder-output-meta-data mode, ACodec does not hold onto
buffers, but they are either with the native window, or with the
component/client. However, for flushing we did not release the
discarded buffers back to native window (this makes sense because
they will be resubmitted shortly.) This logic can be handled by
the normal resubmission.
Change-Id: Ic472b386422251515ef12f426e187f208f14decc
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10621959
Bug: 10192533
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r-- | media/libstagefright/ACodec.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 2e55c4f..5c3abd0 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -2366,6 +2366,10 @@ void ACodec::waitUntilAllPossibleNativeWindowBuffersAreReturnedToUs() { while (countBuffersOwnedByNativeWindow() > (size_t)minUndequeuedBufs && dequeueBufferFromNativeWindow() != NULL) { + // these buffers will be submitted as regular buffers; account for this + if (mStoreMetaDataInOutputBuffers && mMetaDataBuffersToSubmit > 0) { + --mMetaDataBuffersToSubmit; + } } } @@ -4000,10 +4004,9 @@ void ACodec::ExecutingState::submitRegularOutputBuffers() { } void ACodec::ExecutingState::submitOutputBuffers() { + submitRegularOutputBuffers(); if (mCodec->mStoreMetaDataInOutputBuffers) { submitOutputMetaBuffers(); - } else { - submitRegularOutputBuffers(); } } |