diff --git a/src/Cafe/OS/libs/camera/Rgb2Nv12.cpp b/src/Cafe/OS/libs/camera/Rgb2Nv12.cpp index 935d627d..2390be0a 100644 --- a/src/Cafe/OS/libs/camera/Rgb2Nv12.cpp +++ b/src/Cafe/OS/libs/camera/Rgb2Nv12.cpp @@ -51,7 +51,7 @@ void Rgb2Nv12(const uint8* rgbImage, unsigned nv12Pitch) { cemu_assert_debug(!((imageWidth | imageHeight) & 1)); - unsigned char* UV = outNv12Image + imageWidth * imageHeight; + unsigned char* UV = outNv12Image + nv12Pitch * imageHeight; for (auto row = 0u; row < imageHeight; row += 2) {