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

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

 



Hi

On Wed, May 13, 2015 at 10:31 PM, Jeremy White <jwhite@xxxxxxxxxxxxxxx> 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
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

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