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:
parent
1223da76a2
commit
00fec7d5ed
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue