summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/android/jpeg/post_processor_jpeg.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp
index 83244ce6..3bf16996 100644
--- a/src/android/jpeg/post_processor_jpeg.cpp
+++ b/src/android/jpeg/post_processor_jpeg.cpp
@@ -183,7 +183,7 @@ int PostProcessorJpeg::process(const FrameBuffer &source,
/* Fill in the JPEG blob header. */
uint8_t *resultPtr = destination->plane(0).data()
- + destination->plane(0).size()
+ + destination->jpegBufferSize(cameraDevice_->maxJpegBufferSize())
- sizeof(struct camera3_jpeg_blob);
auto *blob = reinterpret_cast<struct camera3_jpeg_blob *>(resultPtr);
blob->jpeg_blob_id = CAMERA3_JPEG_BLOB_ID;