[Spice-commits] src/channel-display-gst.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 10 10:05:02 UTC 2019

 src/channel-display-gst.c |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit bec49c131fc52023450ae3bd583a0701eb08d9a4
Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Jun 10 10:49:29 2019 +0200

    gstreamer: Initialize last_mm_time to avoid an overflow
    The mm_time is an unsigned 32 bit int but spice_mmtime_diff() returns a
    signed 32 bit int. That's reasonable because we normally subtract
    frame times which should be at most seconds apart.
    But last_mm_time was zero on stream startup, resulting in an overflow
    and an uncalled for warning for the first frame in
    spice_gst_decoder_queue_frame() if the uptime was greater than about
    25 days.
    Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
    Acked-by: Snir Sheriber <ssheribe at redhat.com>

diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 88918f1..858e8ae 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -740,6 +740,7 @@ VideoDecoder* create_gstreamer_decoder(int codec_type, display_stream *stream)
         decoder->base.queue_frame = spice_gst_decoder_queue_frame;
         decoder->base.codec_type = codec_type;
         decoder->base.stream = stream;
+        decoder->last_mm_time = stream_get_time(stream);
         decoder->decoding_queue = g_queue_new();

More information about the Spice-commits mailing list