# HG changeset patch # User renatofilho # Date 1165007943 0 # Node ID d591b81268b021a089b1ddb3ccf89b0898b6cb52 # Parent dda330ac986fecafe39be3408cae1b972ee76a41 [svn r173] diff -r dda330ac986f -r d591b81268b0 gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c --- a/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c Fri Dec 01 19:41:39 2006 +0000 +++ b/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c Fri Dec 01 21:19:03 2006 +0000 @@ -1058,11 +1058,10 @@ if (move) { guint8 *data = NULL; data = (guint8 *) gst_adapter_take (nuv->priv->adapter, size); - *buffer = gst_buffer_new (); - GST_BUFFER_SIZE (*buffer) = size; -// GST_BUFFER_MALLOCDATA (*buffer) = g_malloc0 (size); -// memcpy (GST_BUFFER_MALLOCDATA (*buffer), data, size); - GST_BUFFER_DATA (*buffer) = data; + *buffer = gst_buffer_new_alloc (size); + memcpy (GST_BUFFER_DATA (*buffer), data, size); + GST_BUFFER_MALLOCDATA (*buffer) = GST_BUFFER_DATA (*buffer); + g_free (data); } else { guint8 *data = NULL; data = (guint8 *) gst_adapter_peek (nuv->priv->adapter, size);