summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/ACodec.cpp
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2014-03-28 01:50:50 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-28 01:50:50 +0000
commitff382d0c40493303ceb81a6c22d1a48c0fecfe9c (patch)
tree7762984677d2b29965cfbdacf584ca8fa9b7c941 /media/libstagefright/ACodec.cpp
parentc3dcf1007aa964f825b2ea2ef86acb7f332e748f (diff)
parent8bf96c011ff4128f9bf06b892a38d869192d6a25 (diff)
downloadframeworks_av-ff382d0c40493303ceb81a6c22d1a48c0fecfe9c.zip
frameworks_av-ff382d0c40493303ceb81a6c22d1a48c0fecfe9c.tar.gz
frameworks_av-ff382d0c40493303ceb81a6c22d1a48c0fecfe9c.tar.bz2
am 8bf96c01: am 3d4e4fcb: Merge "DO NOT MERGE: Revert "stagefright: allow for minUndequeuedBufs to be one less"" into klp-dev
* commit '8bf96c011ff4128f9bf06b892a38d869192d6a25': DO NOT MERGE: Revert "stagefright: allow for minUndequeuedBufs to be one less"
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r--media/libstagefright/ACodec.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index f5ec635..fc9bee7 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -642,8 +642,8 @@ status_t ACodec::configureOutputBuffersFromNativeWindow(
// FIXME: assume that surface is controlled by app (native window
// returns the number for the case when surface is not controlled by app)
- // FIXME2: This means that minUndeqeueudBufs can be 1 larger than reported
- // For now, try to allocate 1 more buffer, but don't fail if unsuccessful
+ (*minUndequeuedBuffers)++;
+
// Use conservative allocation while also trying to reduce starvation
//
@@ -651,8 +651,7 @@ status_t ACodec::configureOutputBuffersFromNativeWindow(
// minimum needed for the consumer to be able to work
// 2. try to allocate two (2) additional buffers to reduce starvation from
// the consumer
- // plus an extra buffer to account for incorrect minUndequeuedBufs
- for (OMX_U32 extraBuffers = 2 + 1; /* condition inside loop */; extraBuffers--) {
+ for (OMX_U32 extraBuffers = 2; /* condition inside loop */; extraBuffers--) {
OMX_U32 newBufferCount =
def.nBufferCountMin + *minUndequeuedBuffers + extraBuffers;
def.nBufferCountActual = newBufferCount;