spa: libcamera: source: set chunk flags on error

Set `SPA_CHUNK_FLAG_CORRUPTED` if the frame buffer metadata
signals anything other than success.

(cherry picked from commit 25075bb3d7)
This commit is contained in:
Barnabás Pőcze 2025-08-09 01:38:18 +02:00 committed by Robert Mader
parent 8ed8f21100
commit 11d224befa

View file

@ -1075,6 +1075,15 @@ void handle_completed_request(struct impl *impl, libcamera::Request *request)
b->h->dts_offset = 0;
}
for (std::size_t i = 0; i < b->outbuf->n_datas; i++) {
auto *d = &b->outbuf->datas[i];
d->chunk->flags = 0;
if (fmd.status != libcamera::FrameMetadata::Status::FrameSuccess)
d->chunk->flags |= SPA_CHUNK_FLAG_CORRUPTED;
}
request->reuse(libcamera::Request::ReuseFlag::ReuseBuffers);
spa_list_append(&port->queue, &b->link);