summaryrefslogtreecommitdiffstats
path: root/gst/filter/gstiir.c
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2002-08-30 15:30:04 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2002-08-30 15:30:04 +0000
commit113db7f5766aeb4d732cd2f3f10fc9eb03cabc71 (patch)
tree2e826d2d1ced51cedd6a3c4655fdcd3f35e81dda /gst/filter/gstiir.c
parent34f5ea6d6ed00e85910e70e16a7b27992f31d968 (diff)
downloadgst-plugins-bad-113db7f5766aeb4d732cd2f3f10fc9eb03cabc71.tar.gz
gst-plugins-bad-113db7f5766aeb4d732cd2f3f10fc9eb03cabc71.tar.bz2
gst-plugins-bad-113db7f5766aeb4d732cd2f3f10fc9eb03cabc71.zip
copy_on_write
Original commit message from CVS: copy_on_write
Diffstat (limited to 'gst/filter/gstiir.c')
-rw-r--r--gst/filter/gstiir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/filter/gstiir.c b/gst/filter/gstiir.c
index 0bbcb050..c363802c 100644
--- a/gst/filter/gstiir.c
+++ b/gst/filter/gstiir.c
@@ -193,6 +193,9 @@ gst_iir_chain (GstPad * pad, GstBuffer * buf)
src = (gfloat *) GST_BUFFER_DATA (buf);
+ /* get a writable buffer */
+ buf = gst_buffer_copy_on_write (buf);
+
/* do an in-place edit */
for (i = 0; i < GST_BUFFER_SIZE (buf) / sizeof (gfloat); ++i)
*(src + i) = (gfloat) IIR_filter (filter->state, (double) *(src + i));