summaryrefslogtreecommitdiffstats
path: root/gst/audiofx/audiowsincband.c
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2002-08-30 13:39:57 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2002-08-30 13:39:57 +0000
commit2976d0f45d1d3a22bbccbc2921c702fb715e6bea (patch)
tree70f6c61404c62cf89bffe1f4a9bad434dab97a59 /gst/audiofx/audiowsincband.c
parent81fc9a9cb315a495050bec082b47307eae92fe75 (diff)
get a writable buffer
Original commit message from CVS: get a writable buffer
Diffstat (limited to 'gst/audiofx/audiowsincband.c')
-rw-r--r--gst/audiofx/audiowsincband.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/audiofx/audiowsincband.c b/gst/audiofx/audiowsincband.c
index a6aefc6e..916fcbe9 100644
--- a/gst/audiofx/audiowsincband.c
+++ b/gst/audiofx/audiowsincband.c
@@ -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);