# HG changeset patch # User renatofilho # Date 1164988135 0 # Node ID 9726f9ebd4cb6d1334b50222819798dfdea76dab # Parent 81e9da9ad7db8a0bd219fcbaca6f1511ee059fa0 [svn r166] diff -r 81e9da9ad7db -r 9726f9ebd4cb gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c --- a/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c Fri Dec 01 14:52:05 2006 +0000 +++ b/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c Fri Dec 01 15:48:55 2006 +0000 @@ -1089,17 +1089,14 @@ 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_malloc (size); - GST_BUFFER_DATA (buffer) = GST_BUFFER_MALLOCDATA (buffer); - g_free (data); + gst_buffer_set_data (*buffer, data, size); + GST_BUFFER_MALLOCDATA (*buffer) = data; + GST_BUFFER_DATA (*buffer) = data; } else { guint8 *data = NULL; data = (guint8 *) gst_adapter_peek (nuv->priv->adapter, size); *buffer = gst_buffer_new (); - GST_BUFFER_SIZE (buffer) = size; - GST_BUFFER_MALLOCDATA (buffer) = g_malloc (size); - GST_BUFFER_DATA (buffer) = GST_BUFFER_MALLOCDATA (buffer); + gst_buffer_set_data (*buffer, data, size); } } return ret;