summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Gouget <fgouget@codeweavers.com>2019-05-16 01:11:56 +0200
committerFrediano Ziglio <fziglio@redhat.com>2019-05-16 08:23:00 +0100
commitd09c9b43e0c6df4cab5f673492df8d15ccd79963 (patch)
tree82dea6a99b6230d5bbc44eabfd40030cdb9e1ce4
parent07adcce16e8549c22cbce641757446c503b000bf (diff)
reds: Enable mm_time adjustments on startup
This reinstates the reds_enable_mm_time() call in do_spice_init() that was removed by commit c541d7e29dc0. We send mm_time adjustments to the client whenever there is no audio playback. There is no audio playback on startup. Therefore mm_time_enabled must be true on startup. QED. This fixes adjusting the client mm_time whenever playing a silent video (or full desktop stream) when no sound has been played before such as when using Xspice, booting an OS with no startup or login jingle, or possibly when migrating a VM (per commit 1c154ea5ecc3). Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r--server/reds.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/reds.c b/server/reds.c
index d658103e..792e9838 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3570,6 +3570,11 @@ static int do_spice_init(RedsState *reds, SpiceCoreInterface *core_interface)
if (!(reds->mig_timer = reds->core.timer_add(&reds->core, migrate_timeout, reds))) {
spice_error("migration timer create failed");
}
+ /* Note that this will not actually send the mm_time to the client because
+ * the main channel is not connected yet. This would have been redundant
+ * with the RED_PIPE_ITEM_TYPE_MAIN_INIT message anyway.
+ */
+ reds_enable_mm_time(reds);
if (reds_init_net(reds) < 0) {
spice_warning("Failed to open SPICE sockets");