[svn r166] trunk
authorrenatofilho
Fri Dec 01 15:48:55 2006 +0000 (2006-12-01)
branchtrunk
changeset 1659726f9ebd4cb
parent 164 81e9da9ad7db
child 166 ef159b06efc1
[svn r166]
gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c
     1.1 --- a/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c	Fri Dec 01 14:52:05 2006 +0000
     1.2 +++ b/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c	Fri Dec 01 15:48:55 2006 +0000
     1.3 @@ -1089,17 +1089,14 @@
     1.4        guint8 *data = NULL;
     1.5        data = (guint8 *) gst_adapter_take (nuv->priv->adapter, size);
     1.6        *buffer = gst_buffer_new ();
     1.7 -      GST_BUFFER_SIZE (buffer) = size;
     1.8 -      GST_BUFFER_MALLOCDATA (buffer) = g_malloc (size);
     1.9 -      GST_BUFFER_DATA (buffer) = GST_BUFFER_MALLOCDATA (buffer);
    1.10 -      g_free (data);
    1.11 +      gst_buffer_set_data (*buffer, data, size);
    1.12 +      GST_BUFFER_MALLOCDATA (*buffer) = data;
    1.13 +      GST_BUFFER_DATA (*buffer) = data;
    1.14      } else {
    1.15        guint8 *data = NULL;
    1.16        data = (guint8 *) gst_adapter_peek (nuv->priv->adapter, size);
    1.17        *buffer = gst_buffer_new ();
    1.18 -      GST_BUFFER_SIZE (buffer) = size;
    1.19 -      GST_BUFFER_MALLOCDATA (buffer) = g_malloc (size);
    1.20 -      GST_BUFFER_DATA (buffer) = GST_BUFFER_MALLOCDATA (buffer);
    1.21 +      gst_buffer_set_data (*buffer, data, size);
    1.22      }
    1.23    }
    1.24    return ret;