cam: Don't requeue requests when stopping stream
When stopping the stream all pending requests are cancelled, resulting in the request completion signal being emitted with the request status set appropriately. Check the request status in the request completion slot and skip requeuing the request if it has been cancelled. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
parent
b2c06cf409
commit
54e6a3eb1f
1 changed files with 3 additions and 0 deletions
|
@ -102,6 +102,9 @@ static void requestComplete(Request *request, const std::map<Stream *, Buffer *>
|
|||
{
|
||||
static uint64_t last = 0;
|
||||
|
||||
if (request->status() == Request::RequestCancelled)
|
||||
return;
|
||||
|
||||
Buffer *buffer = buffers.begin()->second;
|
||||
|
||||
double fps = buffer->timestamp() - last;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue