summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/OMXCodec.cpp
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-06-01 14:58:37 -0700
committerLajos Molnar <lajos@google.com>2015-06-01 15:31:13 -0700
commitcc7cc67349b7a3f498882087aa42ffc05a2daf11 (patch)
tree8eee8d499bf395c14750b900a82ecc59d47e6dbd /media/libstagefright/OMXCodec.cpp
parentf9a3dce5d44b1ba598cc6f6a2e80da36e44618f7 (diff)
downloadframeworks_av-cc7cc67349b7a3f498882087aa42ffc05a2daf11.zip
frameworks_av-cc7cc67349b7a3f498882087aa42ffc05a2daf11.tar.gz
frameworks_av-cc7cc67349b7a3f498882087aa42ffc05a2daf11.tar.bz2
stagefright: allow to overallocate OMX codec buffers
Specify allottedSize for useBuffer and allocateBufferWithBackup, where OMX will see only the allottedSize, even though framework may allocate and use a bigger buffer. Bug: 13222807 Change-Id: Ibfa93f6c7b7c8ca0853ef17d4a0758e496eaf921
Diffstat (limited to 'media/libstagefright/OMXCodec.cpp')
-rw-r--r--media/libstagefright/OMXCodec.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index aa6a7c0..927cc6c 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -1678,7 +1678,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {
&info.mData);
} else {
err = mOMX->allocateBufferWithBackup(
- mNode, portIndex, mem, &buffer);
+ mNode, portIndex, mem, &buffer, mem->size());
}
} else if (portIndex == kPortIndexOutput
&& (mQuirks & kRequiresAllocateBufferOnOutputPorts)) {
@@ -1690,10 +1690,10 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {
&info.mData);
} else {
err = mOMX->allocateBufferWithBackup(
- mNode, portIndex, mem, &buffer);
+ mNode, portIndex, mem, &buffer, mem->size());
}
} else {
- err = mOMX->useBuffer(mNode, portIndex, mem, &buffer);
+ err = mOMX->useBuffer(mNode, portIndex, mem, &buffer, mem->size());
}
if (err != OK) {