[PATCH spice-gtk] Fix occasional black screen at startup

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

 



From: Christophe de Dinechin <dinechin@xxxxxxxxxx>

The problem occurs when we call spice_playback_channel_set_delay before
the channel had received any data setting c->last_time, but after
session initialization had set mm_time in the session. The result was
that the (good) value in session->mm_time would be overwritten with 0.

Signed-off-by: Christophe de Dinechin <dinechin@xxxxxxxxxx>
---
 src/channel-playback.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/channel-playback.c b/src/channel-playback.c
index ca14b96..f5acf23 100644
--- a/src/channel-playback.c
+++ b/src/channel-playback.c
@@ -471,7 +471,8 @@ void spice_playback_channel_set_delay(SpicePlaybackChannel *channel, guint32 del
 
     session = spice_channel_get_session(SPICE_CHANNEL(channel));
     if (session) {
-        spice_session_set_mm_time(session, c->last_time - delay_ms);
+        if (c->last_time != 0)
+            spice_session_set_mm_time(session, c->last_time - delay_ms);
     } else {
         CHANNEL_DEBUG(channel, "channel detached from session, mm time skipped");
     }
-- 
2.11.0 (Apple Git-81)

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]