[Spice-commits] src/channel-display-gst.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 11 10:33:15 UTC 2019
src/channel-display-gst.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 02fc6f3fd97b3a410829aa3d22afa5f22f022fcc
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Tue Jun 11 11:30:30 2019 +0200
gstreamer: A frame is not late if it should be displayed immediately
schedule_frame() was expecting to be called at least 1 ms before having
to display the frame which is wrong: being called 0 ms before is
acceptable too. Thankfully the frame would usually be the last decoded
frame and would thus be displayed anyway.
Also reverse the inequality to make it easier to understand.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Acked-by: Victor Toso <victortoso at redhat.com>
diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 858e8ae..91ece0f 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -200,7 +200,7 @@ static void schedule_frame(SpiceGstDecoder *decoder)
break;
}
- if (spice_mmtime_diff(now, gstframe->encoded_frame->mm_time) < 0) {
+ if (spice_mmtime_diff(gstframe->encoded_frame->mm_time, now) >= 0) {
decoder->timer_id = g_timeout_add(gstframe->encoded_frame->mm_time - now,
display_frame, decoder);
} else if (decoder->display_frame && !decoder->pending_samples) {
More information about the Spice-commits
mailing list