[Spice-devel] [client] gstreamer: A frame is not late if it should be displayed immediately
Victor Toso
victortoso at redhat.com
Tue Jun 11 10:27:14 UTC 2019
Hi,
On Tue, Jun 11, 2019 at 11:30:30AM +0200, Francois Gouget wrote:
> 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.
Indeed
> Thankfully the frame would usually be the last decoded frame
> and would thus be displayed anyway.
Have you found while reading the code or some other way? Just
curious.
> Also reverse the inequality to make it easier to understand.
That's relative but I don't mind ;)
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Acked-by: Victor Toso <victortoso at redhat.com>
> ---
> src/channel-display-gst.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
> index 858e8aeb..91ece0fa 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) {
> --
> 2.20.1
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190611/549deb37/attachment.sig>
More information about the Spice-devel
mailing list