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

Commit 1243bc5c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "codec2: unlock GraphicBuffer if lockYCbCr succeeded but could not process it" into sc-dev

parents 0a2ef0fe 8faebbc0
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -750,6 +750,16 @@ c2_status_t C2AllocationGralloc::map(

            // We really don't know what this is; lock the buffer and pass it through ---
            // the client may know how to interpret it.

            // unlock previous allocation if it was successful
            if (err == OK) {
                err = GraphicBufferMapper::get().unlock(mBuffer);
                if (err) {
                    ALOGE("failed transaction: unlock");
                    return C2_CORRUPTED;
                }
            }

            void *pointer = nullptr;
            err = GraphicBufferMapper::get().lock(
                    const_cast<native_handle_t *>(mBuffer), grallocUsage, rect, &pointer);