summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2013-06-03 20:30:48 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-06-03 20:30:48 +0000
commit25b5617c56488fe5413473ffae6b43f6c5bddc96 (patch)
treeb0d39fd67a93c532a3321f922435e6b84b069460 /media
parentb7319a7eb0a06ef4fd3a0c9157ee63e637ad7aa1 (diff)
parente532d37cf9342abbca398e4ce671b880369d90c6 (diff)
downloadframeworks_av-25b5617c56488fe5413473ffae6b43f6c5bddc96.zip
frameworks_av-25b5617c56488fe5413473ffae6b43f6c5bddc96.tar.gz
frameworks_av-25b5617c56488fe5413473ffae6b43f6c5bddc96.tar.bz2
Merge "stagefright: Fix port-reconfiguration & output-buffer-filled race condition" into jb-mr2-dev
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/ACodec.cpp10
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));
}
}