[Spice-devel] [PATCH spice-gtk 9/11] Add the ability to use gstreamer for vp8 decoding.

Marc-André Lureau marcandre.lureau at gmail.com
Tue May 19 05:53:12 PDT 2015


Hi

On Wed, May 13, 2015 at 10:31 PM, Jeremy White <jwhite at codeweavers.com>
wrote:

> +    // TODO.  Grr.  Seems like a wasted alloc
> +    d = g_malloc(size);
> +    memcpy(d, data, size);
> +
>

It could reference the msg, this would guarantee the data remains valid and
unref it when no longer needed.


> +    buffer = gst_buffer_new_wrapped(d, size);
> +
> +    if (gst_app_src_push_buffer(GST_APP_SRC(st->gst_dec->appsource),
> buffer) != GST_FLOW_OK) {
> +        SPICE_DEBUG("Error: unable to push frame of size %d", size);
> +        return false;
> +    }
> +
> +    // TODO.  Unref buffer?
>

Reference is taken by push_buffer()

Overall, looks good to me.

-- 
Marc-André Lureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150519/eccaf655/attachment.html>


More information about the Spice-devel mailing list