From: Mathias Agopian Date: Fri, 19 Jul 2013 05:25:55 +0000 (-0700) Subject: make sure to reset the framenumber when a buffer is marked FREE X-Git-Tag: android-x86-4.4-r1~159^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=26a6f37cc06b8014edcedbee8d5558ca7da9abe3;p=android-x86%2Fframeworks-native.git make sure to reset the framenumber when a buffer is marked FREE Change-Id: Ic45929f35553de209801f74e8006fb1bf0b25b45 --- diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp index cf8143135e..73bd4888ba 100644 --- a/libs/gui/BufferQueue.cpp +++ b/libs/gui/BufferQueue.cpp @@ -555,6 +555,9 @@ status_t BufferQueue::queueBuffer(int buf, // buffer slot currently queued is marked free if still tracked if (stillTracking(front)) { mSlots[front->mBuf].mBufferState = BufferSlot::FREE; + // reset the frame number of the freed buffer so that it is the first in + // line to be dequeued again. + mSlots[front->mBuf].mFrameNumber = 0; } // and we record the new buffer in the queued list *front = item;