[PATCH 10/10] dcc-send: Fix freeze when video stream is stopped during ongoing draw

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

 



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@xxxxxxxxxxxxxxxxxx>
---
 server/dcc-send.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/server/dcc-send.cpp b/server/dcc-send.cpp
index 7bc20a22..71873563 100644
--- a/server/dcc-send.cpp
+++ b/server/dcc-send.cpp
@@ -2383,6 +2383,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) {
+        DisplayChannel *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");
     }
-- 
2.48.1




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux