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