diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2021-03-02 14:34:27 +0100 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2021-03-03 09:50:38 +0100 |
commit | 00fec7d5edaf190429654191a651a180b02d56f9 (patch) | |
tree | 1b19162d77b80ff77b348ea42911d93f47b1b5da /src/android/jpeg | |
parent | 1223da76a2671e9bbe05e286fb0ce8b29b55b529 (diff) |
android: jpeg: Use CameraBuffer::jpegBufferSize()
Use the newly introduced function to retrieve the size of
the JPEG encoding destination buffer, in order to calculate where
the JPEG_BLOB_ID should be placed.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/jpeg')
-rw-r--r-- | src/android/jpeg/post_processor_jpeg.cpp | 2 |
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; |