mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-26 23:29:23 -05:00
PipeWire supports two flags to signal an invalid buffer: SPA_META_HEADER_FLAG_CORRUPTED signals that the whole buffer is invalid and should not be used SPA_CHUNK_FLAG_CORRUPTED signals that one single buffer plane is invalid Skipping a buffer because of size 0 was moved to only the SHM case. For DMA-BUFs the size of a single plane is not relevant and should be ignored [1]. Compatibility note: GNOME pre 43 sets the chunk size to 0 when a buffer copy failed. Luckily GNOME doesn't use the META_Header and thus we can detect if we should use the new or old style of invalid buffer detection. This workaround should be dropped when reasonable. [1] https://docs.pipewire.org/page_dma_buf.html