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

Commit fad4c79d authored by Chong Zhang's avatar Chong Zhang Committed by Pawin Vongmasa
Browse files

C2AllocatorGralloc: Fix stride in map()

This is a continuation of the CL with change-id
I1a587544fcf864d4a239252a8a2dc2569161e279.

The code has another typo where "if" should be an "else if",
which causes the stride on mapper2 always set to 0.

bug: 143551816
test:
- play vp9 test clip in the bug for sw renderer on Pixel3
(modify xml to force sw decoding), video should look normal.
- run MediaMetadataRetrieverTest#testThumbnailVP9Hdr with output
file dump, output should look normal.

Change-Id: Ia384dfa1cf37947cd20709ecebacd0158ae3329f
parent 16f57911
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -769,7 +769,7 @@ c2_status_t C2AllocationGralloc::map(
            int32_t stride;
            int32_t stride;
            if (mMapper2) {
            if (mMapper2) {
                stride = int32_t(mInfo2.stride);
                stride = int32_t(mInfo2.stride);
            } if (mMapper3) {
            } else if (mMapper3) {
                stride = int32_t(mInfo3.stride);
                stride = int32_t(mInfo3.stride);
            } else {
            } else {
                stride = int32_t(mInfo4.stride);
                stride = int32_t(mInfo4.stride);