V4L2VideoDevice: Call FrameBuffer::Private::cancel() in streamOff()

At the moment `V4L2VideoDevice::streamOff()` sets
`FrameBuffer::Private`'s metadata directly, while that's equivalent to
calling `FrameBuffer::Private::cancel()`. To ease code tracing, this
patch replace the manual modification with the function call.

Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Umang Jain <uajain@igalia.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Harvey Yang 2024-12-09 16:34:07 +00:00 committed by Kieran Bingham
parent 17eed522e8
commit 525325440b

View file

@ -2031,10 +2031,9 @@ int V4L2VideoDevice::streamOff()
/* Send back all queued buffers. */ /* Send back all queued buffers. */
for (auto it : queuedBuffers_) { for (auto it : queuedBuffers_) {
FrameBuffer *buffer = it.second; FrameBuffer *buffer = it.second;
FrameMetadata &metadata = buffer->_d()->metadata();
cache_->put(it.first); cache_->put(it.first);
metadata.status = FrameMetadata::FrameCancelled; buffer->_d()->cancel();
bufferReady.emit(buffer); bufferReady.emit(buffer);
} }