[Spice-devel] [PATCH spice-gtk v3 6/6] mjpeg: Take the decoding time into account to display frames
Frediano Ziglio
fziglio at redhat.com
Fri Jul 26 09:52:13 UTC 2019
From: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
src/channel-display-mjpeg.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/channel-display-mjpeg.c b/src/channel-display-mjpeg.c
index 20e10d9b..764f0611 100644
--- a/src/channel-display-mjpeg.c
+++ b/src/channel-display-mjpeg.c
@@ -189,6 +189,9 @@ static void mjpeg_decoder_schedule(MJpegDecoder *decoder)
if (frame) {
if (spice_mmtime_diff(time, frame->time) <= 0) {
guint32 d = frame->time - time;
+ if (d > decoder->base.decoding_time) {
+ d -= decoder->base.decoding_time;
+ }
decoder->cur_frame = frame;
decoder->timer_id = g_timeout_add(d, mjpeg_decoder_decode_frame, decoder);
break;
--
2.20.1
More information about the Spice-devel
mailing list