[gnome-remote-desktop] rdp-gfx-surface: Don't forget to set the surface serial



commit 285f7306cec63ca842ba6b0b204717363afe8d7e
Author: Pascal Nowack <Pascal Nowack gmx de>
Date:   Thu Feb 10 11:25:27 2022 +0100

    rdp-gfx-surface: Don't forget to set the surface serial
    
    Currently, the serial of a GFX surface is not set, making the serial
    for each GFX surface effectively 0.
    This is currently not a problem. But with virtual monitors and dynamic
    resolution, this can lead to crashes in surface_serial_unref() in the
    graphics pipeline, when not all frame acks are received, but the
    virtual monitor has been recreated.
    In that case the surface context is replaced and the old reference
    count is lost, leading to an assert hit, when a frame ack is received
    and the reference of the old surface serial is decremented.
    
    Fix this issue by setting the surface serial, when creating a new GFX
    surface.

 src/grd-rdp-gfx-surface.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/src/grd-rdp-gfx-surface.c b/src/grd-rdp-gfx-surface.c
index 9ba5e25e..a5b97efe 100644
--- a/src/grd-rdp-gfx-surface.c
+++ b/src/grd-rdp-gfx-surface.c
@@ -343,6 +343,7 @@ grd_rdp_gfx_surface_new (GrdRdpGraphicsPipeline *graphics_pipeline,
   gfx_surface->session_rdp = session_rdp;
   gfx_surface->rdp_surface = rdp_surface;
   gfx_surface->surface_id = surface_id;
+  gfx_surface->serial = serial;
   /*
    * Use the same id for the codec context as for the surface
    * (only relevant for RDPGFX_WIRE_TO_SURFACE_PDU_2 PDUs)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]