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

Commit 386c36ff authored by Liu, Kai1's avatar Liu, Kai1 Committed by Bing
Browse files

Fix the issue of NV12 input with wrong format VPX_IMG_FMT_I420

C2SoftVpxEnc uses NV12 input data but format is specified as I420,
which causes the recorded video messy.

The fix is using mConversionBuffer as input, whose format is I420.

Bug: 139906732
Test:
Change-Id: Ib94dd217a82b2bac57056cfc3af5344da78b47d7
parent 9a5a544b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -514,7 +514,7 @@ void C2SoftVpxEnc::process(
                        return;
                    }
                    vpx_img_wrap(&raw_frame, VPX_IMG_FMT_I420, stride, vstride,
                                 mStrideAlign, (uint8_t*)rView->data()[0]);
                                 mStrideAlign, mConversionBuffer.data());
                    vpx_img_set_rect(&raw_frame, 0, 0, width, height);
                } else {
                    ALOGE("Conversion buffer is too small: %u x %u for %zu",