spa: libcamera: source: set "corrupted" flag if applicable

If the libcamera `FrameMetadata` reports anything other than `FrameSuccess`,
then set `SPA_META_HEADER_FLAG_CORRUPTED`, notifying the application that
the frame may be unusable.
This commit is contained in:
Barnabás Pőcze 2025-07-12 18:56:12 +02:00 committed by Wim Taymans
parent 0022fc90b7
commit 561a9d6ebb

View file

@ -1222,6 +1222,8 @@ void impl::requestComplete(libcamera::Request *request)
} }
if (b->h) { if (b->h) {
b->h->flags = 0; b->h->flags = 0;
if (fmd.status != FrameMetadata::Status::FrameSuccess)
b->h->flags |= SPA_META_HEADER_FLAG_CORRUPTED;
b->h->offset = 0; b->h->offset = 0;
b->h->seq = fmd.sequence; b->h->seq = fmd.sequence;
b->h->pts = fmd.timestamp; b->h->pts = fmd.timestamp;