[Spice-devel] [client 1/5] gstreamer: Avoid direct access to GQueue fields

Frediano Ziglio fziglio at redhat.com
Fri Jun 14 17:09:16 UTC 2019


> 
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>

Considering that the field is public and that code will get 
slower and bigger at least would be good to describe the reason
why you consider it better.

OT: I don't understand why they didn't define g_queue_get_length
as an inline or a macro...

> ---
>  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 91ece0fa..c756f916 100644
> --- a/src/channel-display-gst.c
> +++ b/src/channel-display-gst.c
> @@ -278,7 +278,7 @@ static SpiceGstFrame *get_decoded_frame(SpiceGstDecoder
> *decoder, GstBuffer *buf
>                 "frame mm_time %u size %u creation time %" PRId64
>                 " decoded time %" PRId64 " queue %u",
>                 frame->mm_time, frame->size, frame->creation_time,
> -               duration, decoder->decoding_queue->length);
> +               duration, g_queue_get_length(decoder->decoding_queue));
>      }
>      return gstframe;
>  }

Frediano


More information about the Spice-devel mailing list