[Spice-devel] [client] gstreamer: Initialize last_mm_time to avoid an overflow
Snir Sheriber
ssheribe at redhat.com
Mon Jun 10 09:55:58 UTC 2019
Hi,
On 6/10/19 11:49 AM, Francois Gouget wrote:
> 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 substract
s/substract/subtract
Ack, I'll do this fix and push
> 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>
> ---
> src/channel-display-gst.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
> index 88918f10..858e8aeb 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);
> g_mutex_init(&decoder->queues_mutex);
> decoder->decoding_queue = g_queue_new();
>
More information about the Spice-devel
mailing list