diff options
author | Lajos Molnar <lajos@google.com> | 2013-06-03 13:32:36 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-06-03 13:32:36 -0700 |
commit | e64d41332776e3c91f51c3239589695bf2cd0aeb (patch) | |
tree | 68e04458f7ff4d233bbb075298dcef9ce2d15560 | |
parent | f9bb8358e454be6dc88403171db7e0e182407f17 (diff) | |
parent | 25b5617c56488fe5413473ffae6b43f6c5bddc96 (diff) | |
download | frameworks_av-e64d41332776e3c91f51c3239589695bf2cd0aeb.zip frameworks_av-e64d41332776e3c91f51c3239589695bf2cd0aeb.tar.gz frameworks_av-e64d41332776e3c91f51c3239589695bf2cd0aeb.tar.bz2 |
am 25b5617c: Merge "stagefright: Fix port-reconfiguration & output-buffer-filled race condition" into jb-mr2-dev
* commit '25b5617c56488fe5413473ffae6b43f6c5bddc96':
stagefright: Fix port-reconfiguration & output-buffer-filled race condition
-rw-r--r-- | media/libstagefright/ACodec.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 994d3f4..64e3885 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -748,12 +748,10 @@ status_t ACodec::freeOutputBuffersNotOwnedByComponent() { BufferInfo *info = &mBuffers[kPortIndexOutput].editItemAt(i); - if (info->mStatus != - BufferInfo::OWNED_BY_COMPONENT) { - // We shouldn't have sent out any buffers to the client at this - // point. - CHECK_NE((int)info->mStatus, (int)BufferInfo::OWNED_BY_DOWNSTREAM); - + // At this time some buffers may still be with the component + // or being drained. + if (info->mStatus != BufferInfo::OWNED_BY_COMPONENT && + info->mStatus != BufferInfo::OWNED_BY_DOWNSTREAM) { CHECK_EQ((status_t)OK, freeBuffer(kPortIndexOutput, i)); } } |