<div dir="ltr"><div class="gmail_extra">Hi<br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_quote">On Wed, May 13, 2015 at 10:31 PM, Jeremy White <span dir="ltr"><<a href="mailto:jwhite@codeweavers.com" target="_blank">jwhite@codeweavers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id=":itl" class="" style="overflow:hidden">+ // TODO. Grr. Seems like a wasted alloc<br>
+ d = g_malloc(size);<br>
+ memcpy(d, data, size);<br>
+<br></div></blockquote><div> </div><div>It could reference the msg, this would guarantee the data remains valid and unref it when no longer needed.<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id=":itl" class="" style="overflow:hidden">
+ buffer = gst_buffer_new_wrapped(d, size);<br>
+<br>
+ if (gst_app_src_push_buffer(GST_APP_SRC(st->gst_dec->appsource), buffer) != GST_FLOW_OK) {<br>
+ SPICE_DEBUG("Error: unable to push frame of size %d", size);<br>
+ return false;<br>
+ }<br>
+<br>
+ // TODO. Unref buffer?</div></blockquote></div><br></div><div class="gmail_extra">Reference is taken by push_buffer()<br><br></div><div class="gmail_extra">Overall, looks good to me.<br><br>-- <br><div class="gmail_signature">Marc-André Lureau</div>
</div></div>