mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
screen-cast/src: Clean up DMA-BUF only error paths
When a stream source subclass asks for a DMA-BUF only frame record, it is legitimate to return FALSE in do_record_frame() - meaning that a frame was not recorded - but not return an error - meaning nothing actually failed. This avoids spamming the journal with warnings on a legitimate case. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2804>
This commit is contained in:
parent
16aa2943e2
commit
ded7b8dfba
@ -516,6 +516,9 @@ do_record_frame (MetaScreenCastStreamSrc *src,
|
||||
gboolean dmabuf_only;
|
||||
|
||||
dmabuf_only = flags & META_SCREEN_CAST_RECORD_FLAG_DMABUF_ONLY;
|
||||
if (dmabuf_only && spa_buffer->datas[0].type != SPA_DATA_DmaBuf)
|
||||
return FALSE;
|
||||
|
||||
if (!dmabuf_only &&
|
||||
(spa_buffer->datas[0].data ||
|
||||
spa_buffer->datas[0].type == SPA_DATA_MemFd))
|
||||
@ -818,7 +821,8 @@ meta_screen_cast_stream_src_maybe_record_frame_with_timestamp (MetaScreenCastStr
|
||||
}
|
||||
else
|
||||
{
|
||||
g_warning ("Failed to record screen cast frame: %s", error->message);
|
||||
if (error)
|
||||
g_warning ("Failed to record screen cast frame: %s", error->message);
|
||||
spa_buffer->datas[0].chunk->size = 0;
|
||||
spa_buffer->datas[0].chunk->flags = SPA_CHUNK_FLAG_CORRUPTED;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user