Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f9ed8b5 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by android-build-merger
Browse files

Merge "media: Fix graphic buffer leak."

am: 4bcdf599

Change-Id: I20422d2ccb48fb1434b0a7cd614e2ac304372208
parents 4a17304c 4bcdf599
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -921,11 +921,12 @@ int GraphicBufferSource::findMatchingCodecBuffer_l(
 * frameNum: frame number of the frame being released
 * buffer: GraphicBuffer pointer to release (note this must not be & as we
 *         will clear the original mBufferSlot in persistent case)
 *         Use NOLINT to supress warning on the copy of 'buffer'.
 * fence: fence of the frame being released
 */
void GraphicBufferSource::releaseBuffer(
        int &id, uint64_t frameNum,
        const sp<GraphicBuffer> &buffer, const sp<Fence> &fence) {
        const sp<GraphicBuffer> buffer, const sp<Fence> &fence) {  // NOLINT
    if (mIsPersistent) {
        mConsumer->detachBuffer(id);
        mBufferSlot[id] = NULL;
+1 −1
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ private:
    // Release buffer to the consumer
    void releaseBuffer(
            int &id, uint64_t frameNum,
            const sp<GraphicBuffer> &buffer, const sp<Fence> &fence);
            const sp<GraphicBuffer> buffer, const sp<Fence> &fence);

    void setLatestBuffer_l(const BufferItem &item, bool dropped);
    bool repeatLatestBuffer_l();