diff options
-rw-r--r-- | media/libstagefright/ACodec.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index a81bca5..00a1e29 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -1336,7 +1336,8 @@ ACodec::BufferInfo *ACodec::dequeueBufferFromNativeWindow() { } bool stale = false; - for (size_t i = mBuffers[kPortIndexOutput].size(); i-- > 0;) { + for (size_t i = mBuffers[kPortIndexOutput].size(); i > 0;) { + i--; BufferInfo *info = &mBuffers[kPortIndexOutput].editItemAt(i); if (info->mGraphicBuffer != NULL && @@ -1379,7 +1380,8 @@ ACodec::BufferInfo *ACodec::dequeueBufferFromNativeWindow() { // get oldest undequeued buffer BufferInfo *oldest = NULL; - for (size_t i = mBuffers[kPortIndexOutput].size(); i-- > 0;) { + for (size_t i = mBuffers[kPortIndexOutput].size(); i > 0;) { + i--; BufferInfo *info = &mBuffers[kPortIndexOutput].editItemAt(i); if (info->mStatus == BufferInfo::OWNED_BY_NATIVE_WINDOW && |