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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user