[client v2 12/12] mjpeg: Take the decoding time into account to display frames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
---
 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
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]