I am trying to copy from the original buffer
buf (in the
chain function) to another buffer created using:
GstBuffer *buffer; glong size; size = GST_BUFFER_SIZE(buf); buffer = gst_buffer_new (); GST_BUFFER_SIZE (buffer) = size; GST_BUFFER_MALLOCDATA (buffer) = g_malloc (size); GST_BUFFER_DATA (buffer) = GST_BUFFER_MALLOCDATA (buffer); memcpy(buffer,buf,size);
But I get a segmentation fault. Is there anything wrong here?