dcc-send: Fix freeze when video stream is stopped during ongoing draw

Prevent a freeze that occurs if the video stream is stopped while a
gl draw is in progress (e.g., when the client requests a new codec).
Ensure proper cleanup of the ongoing gl draw.

Signed-off-by: Michael Scherle <michael.scherle@rz.uni-freiburg.de>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
This commit is contained in:
Michael Scherle 2024-10-31 14:02:44 +01:00 committed by Frediano Ziglio
parent 0173d735a4
commit 36f79f251b

View File

@ -2389,6 +2389,10 @@ static void marshall_gl_draw(DisplayChannelClient *dcc,
spice_marshall_msg_display_gl_draw(m, &p->draw);
} else if (DCC_TO_DC(dcc)->priv->gl_draw_stream) {
red_marshall_gl_draw_stream(dcc, m);
} else if (dcc->priv->gl_draw_ongoing) {
auto display = DCC_TO_DC(dcc);
dcc->priv->gl_draw_ongoing = false;
display_channel_gl_draw_done(display);
} else {
spice_warning("nothing to send to the client");
}