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

Victor Toso victortoso at redhat.com
Fri Jul 14 10:43:26 UTC 2017


Hi,

On Thu, Jul 13, 2017 at 06:44:09PM +0200, Christophe de Dinechin wrote:
> From: Christophe de Dinechin <dinechin at redhat.com>
>
> 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 at redhat.com>
> ---
>  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);


I actually think we should not be setting mm_time in the client as this
could affect the audio/video sync that should be dictated by server.

This function was introduced in 2010, not much info on the rationale.

commit fbe3b5ec32e3d93f0a0f41239b85be723d8d91c5
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Wed Dec 22 15:32:45 2010 +0100

    gtk: update mm time based on playback time+delay

Running spice client without audio over h264 stream, makes the lag go
down a bit.

>      } else {
>          CHANNEL_DEBUG(channel, "channel detached from session, mm time skipped");
>      }
> -- 
> 2.11.0 (Apple Git-81)
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170714/bb6414be/attachment.sig>


More information about the Spice-devel mailing list