diff options
author | Wei Jia <wjia@google.com> | 2015-04-30 00:42:03 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-30 00:42:05 +0000 |
commit | 7b21efcf733b59ea317fc6dba267c79ac1ed5d5d (patch) | |
tree | bdfb75ac3e7683a1de63d742560ae96b998b32df | |
parent | 291a39b967fcef0ae5bf0dc924587e8cdde6148a (diff) | |
parent | 3298d6fa642c11c5b004bdfc375252ff4c4536e3 (diff) | |
download | frameworks_av-7b21efcf733b59ea317fc6dba267c79ac1ed5d5d.zip frameworks_av-7b21efcf733b59ea317fc6dba267c79ac1ed5d5d.tar.gz frameworks_av-7b21efcf733b59ea317fc6dba267c79ac1ed5d5d.tar.bz2 |
Merge "stagefright: make BufferQueueProducer not re-allocate buffer when trying to dequeue a buffer on devices not supporting meta data buffer mode." into mnc-dev
-rw-r--r-- | media/libstagefright/ACodec.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 955d12f..4fcee90 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -806,6 +806,11 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { return err; mNumUndequeuedBuffers = minUndequeuedBuffers; + if (!mStoreMetaDataInOutputBuffers) { + static_cast<Surface*>(mNativeWindow.get()) + ->getIGraphicBufferProducer()->allowAllocation(true); + } + ALOGV("[%s] Allocating %u buffers from a native window of size %u on " "output port", mComponentName.c_str(), bufferCount, bufferSize); @@ -864,6 +869,11 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() { } } + if (!mStoreMetaDataInOutputBuffers) { + static_cast<Surface*>(mNativeWindow.get()) + ->getIGraphicBufferProducer()->allowAllocation(false); + } + return err; } |