diff options
author | 2017-03-30 13:13:36 -0700 | |
---|---|---|
committer | 2017-04-01 13:03:15 -0700 | |
commit | 723c48987209c93a902c29a858880b4fe340509d (patch) | |
tree | 46c8140de5c1feca043a22425ad8d646e584fd84 /libs/gui/ConsumerBase.cpp | |
parent | f2e5430b95b9545e5a355607ba8e7d693b7a7d18 (diff) |
DO NOT MERGE: ConsumerBase: call freeBufferLocked when a slot is overwritten
Cherrypicked from master.
Test: the CL + camera service side fix pass ReprocessCaptureTest
Bug: 34461678
Change-Id: Ia7863321bcb46cba53532fc1570c5facd9280aaa
Diffstat (limited to 'libs/gui/ConsumerBase.cpp')
-rw-r--r-- | libs/gui/ConsumerBase.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/gui/ConsumerBase.cpp b/libs/gui/ConsumerBase.cpp index 8acdfed8f5..d4e4dc3616 100644 --- a/libs/gui/ConsumerBase.cpp +++ b/libs/gui/ConsumerBase.cpp @@ -287,6 +287,9 @@ status_t ConsumerBase::acquireBufferLocked(BufferItem *item, } if (item->mGraphicBuffer != NULL) { + if (mSlots[item->mSlot].mGraphicBuffer != NULL) { + freeBufferLocked(item->mSlot); + } mSlots[item->mSlot].mGraphicBuffer = item->mGraphicBuffer; } |