libcamera: camera: Don't move buffers away from request at completion
For a historical reason that isn't fully understood, the request completion handler in the Camera class moves all buffers away from the request's buffer map to a local variable before emitting the request completion signal. There's no reason to do so, and it makes it impossible for requests to access buffers in their destructor. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -894,8 +894,7 @@ int Camera::stop()
|
||||
*/
|
||||
void Camera::requestComplete(Request *request)
|
||||
{
|
||||
std::map<Stream *, Buffer *> buffers(std::move(request->bufferMap_));
|
||||
requestCompleted.emit(request, buffers);
|
||||
requestCompleted.emit(request, request->bufferMap_);
|
||||
delete request;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user