get a writable buffer

Original commit message from CVS:
get a writable buffer
This commit is contained in:
Thomas Vander Stichele 2002-08-30 13:39:57 +00:00
parent 44a43596c2
commit 34f5ea6d6e

View file

@ -267,7 +267,7 @@ gst_bpwsinc_sink_connect (GstPad * pad, GstCaps * caps)
}
static void
gst_bpwsinc_chain (GstPad * pad, GstBuffer * buf)
gst_bpwsinc_chain (GstPad *pad, GstBuffer *buf)
{
GstBPWSinc *filter;
gfloat *src;
@ -285,6 +285,9 @@ gst_bpwsinc_chain (GstPad * pad, GstBuffer * buf)
* to make amends we keep the incoming buffer around and write our
* output samples there */
/* get a writable buffer */
buf = gst_buffer_copy_on_write (buf);
src = (gfloat *) GST_BUFFER_DATA (buf);
residue_samples = filter->wing_size * 2 + 1;
input_samples = GST_BUFFER_SIZE (buf) / sizeof (gfloat);