From 7f28fa6c79c4af398ea45f25d956b2b908fb4277 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Tue, 24 Jan 2023 14:46:43 -0300 Subject: screen-cast/src: Shuffle a variable around This GError is only used within the frame recording block, so move it there. Part-of: --- src/backends/meta-screen-cast-stream-src.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backends/meta-screen-cast-stream-src.c b/src/backends/meta-screen-cast-stream-src.c index 6c071236a..91a8afab4 100644 --- a/src/backends/meta-screen-cast-stream-src.c +++ b/src/backends/meta-screen-cast-stream-src.c @@ -707,7 +707,6 @@ meta_screen_cast_stream_src_maybe_record_frame_with_timestamp (MetaScreenCastStr struct spa_buffer *spa_buffer; struct spa_meta_header *header; uint8_t *data = NULL; - g_autoptr (GError) error = NULL; /* Accumulate the damaged region since we might not schedule a frame capture * eventually but once we do, we should report all the previous damaged areas. @@ -781,6 +780,8 @@ meta_screen_cast_stream_src_maybe_record_frame_with_timestamp (MetaScreenCastStr if (!(flags & META_SCREEN_CAST_RECORD_FLAG_CURSOR_ONLY)) { + g_autoptr (GError) error = NULL; + g_clear_handle_id (&priv->follow_up_frame_source_id, g_source_remove); if (do_record_frame (src, flags, spa_buffer, data, &error)) { -- cgit v1.2.1