summaryrefslogtreecommitdiff
path: root/src/android/jpeg/encoder_libjpeg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/jpeg/encoder_libjpeg.cpp')
-rw-r--r--src/android/jpeg/encoder_libjpeg.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/android/jpeg/encoder_libjpeg.cpp b/src/android/jpeg/encoder_libjpeg.cpp
index b8b01e20..807a0949 100644
--- a/src/android/jpeg/encoder_libjpeg.cpp
+++ b/src/android/jpeg/encoder_libjpeg.cpp
@@ -152,7 +152,7 @@ void EncoderLibJpeg::compressNV(Span<const uint8_t> frame)
for (unsigned int y = 0; y < compress_.image_height; y++) {
unsigned char *dst = &tmprowbuf[0];
- const unsigned char *src_y = src + y * compress_.image_width;
+ const unsigned char *src_y = src + y * y_stride;
const unsigned char *src_cb = src_c + (y / vertSubSample) * c_stride + cb_pos;
const unsigned char *src_cr = src_c + (y / vertSubSample) * c_stride + cr_pos;