diff options
author | Lajos Molnar <lajos@google.com> | 2014-03-28 01:45:10 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-28 01:45:10 +0000 |
commit | 8bf96c011ff4128f9bf06b892a38d869192d6a25 (patch) | |
tree | 369426fa05f2923450b30b6f6f424a5aa0da7c5b /media/libstagefright/OMXCodec.cpp | |
parent | 65550a0e17852fe657795508e3bf05bdbfb2520b (diff) | |
parent | 3d4e4fcbcfc5c16dd794591727f5c713831ab6dc (diff) | |
download | frameworks_av-8bf96c011ff4128f9bf06b892a38d869192d6a25.zip frameworks_av-8bf96c011ff4128f9bf06b892a38d869192d6a25.tar.gz frameworks_av-8bf96c011ff4128f9bf06b892a38d869192d6a25.tar.bz2 |
am 3d4e4fcb: Merge "DO NOT MERGE: Revert "stagefright: allow for minUndequeuedBufs to be one less"" into klp-dev
* commit '3d4e4fcbcfc5c16dd794591727f5c713831ab6dc':
DO NOT MERGE: Revert "stagefright: allow for minUndequeuedBufs to be one less"
Diffstat (limited to 'media/libstagefright/OMXCodec.cpp')
-rw-r--r-- | media/libstagefright/OMXCodec.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index a5671a0..4c460bd 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -1797,8 +1797,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { } // 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 + minUndequeuedBufs++; // Use conservative allocation while also trying to reduce starvation // @@ -1806,11 +1805,10 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { // 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 - CODEC_LOGI("OMX-buffers: min=%u actual=%u undeq=%d+1", + CODEC_LOGI("OMX-buffers: min=%u actual=%u undeq=%d", def.nBufferCountMin, def.nBufferCountActual, 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 + minUndequeuedBufs + extraBuffers; def.nBufferCountActual = newBufferCount; @@ -1829,7 +1827,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { return err; } } - CODEC_LOGI("OMX-buffers: min=%u actual=%u undeq=%d+1", + CODEC_LOGI("OMX-buffers: min=%u actual=%u undeq=%d", def.nBufferCountMin, def.nBufferCountActual, minUndequeuedBufs); err = native_window_set_buffer_count( |