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

Commit 72c93f5f authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "CCodec: fix wrapping logic" am: d4c493df

parents 0b730f5e d4c493df
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -533,7 +533,7 @@ public:
                        * align(mHeight, 64) / plane.rowSampling;
            }

            if (minPtr == mView.data()[0] && (maxPtr - minPtr + 1) <= planeSize) {
            if (minPtr == mView.data()[0] && (maxPtr - minPtr) <= planeSize) {
                // FIXME: this is risky as reading/writing data out of bound results
                //        in an undefined behavior, but gralloc does assume a
                //        contiguous mapping
@@ -545,8 +545,7 @@ public:
                    mediaImage->mPlane[i].mHorizSubsampling = plane.colSampling;
                    mediaImage->mPlane[i].mVertSubsampling = plane.rowSampling;
                }
                mWrapped = new ABuffer(const_cast<uint8_t *>(minPtr),
                                       maxPtr - minPtr + 1);
                mWrapped = new ABuffer(const_cast<uint8_t *>(minPtr), maxPtr - minPtr);
                ALOGV("Converter: wrapped (capacity=%zu)", mWrapped->capacity());
            }
        }