[svn r173] trunk
authorrenatofilho
Fri Dec 01 21:19:03 2006 +0000 (2006-12-01)
branchtrunk
changeset 172d591b81268b0
parent 171 dda330ac986f
child 173 a2ec843160c8
[svn r173]
gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c
     1.1 --- a/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c	Fri Dec 01 19:41:39 2006 +0000
     1.2 +++ b/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c	Fri Dec 01 21:19:03 2006 +0000
     1.3 @@ -1058,11 +1058,10 @@
     1.4      if (move) {
     1.5        guint8 *data = NULL;
     1.6        data = (guint8 *) gst_adapter_take (nuv->priv->adapter, size);
     1.7 -      *buffer = gst_buffer_new ();
     1.8 -      GST_BUFFER_SIZE (*buffer) = size;
     1.9 -//      GST_BUFFER_MALLOCDATA (*buffer) = g_malloc0 (size);
    1.10 -//      memcpy (GST_BUFFER_MALLOCDATA (*buffer), data, size);
    1.11 -      GST_BUFFER_DATA (*buffer) = data;
    1.12 +      *buffer = gst_buffer_new_alloc (size);
    1.13 +      memcpy (GST_BUFFER_DATA (*buffer), data, size);
    1.14 +      GST_BUFFER_MALLOCDATA (*buffer) = GST_BUFFER_DATA (*buffer);
    1.15 +      g_free (data);
    1.16      } else {
    1.17        guint8 *data = NULL;
    1.18        data = (guint8 *) gst_adapter_peek (nuv->priv->adapter, size);