mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
spa: libcamera: source: set chunk flags on error
Set `SPA_CHUNK_FLAG_CORRUPTED` if the frame buffer metadata signals anything other than success.
This commit is contained in:
parent
019a5c130f
commit
25075bb3d7
1 changed files with 9 additions and 0 deletions
|
|
@ -1077,6 +1077,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue