diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2002-08-30 13:39:57 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2002-08-30 13:39:57 +0000 |
commit | 34f5ea6d6ed00e85910e70e16a7b27992f31d968 (patch) | |
tree | 9032abdea79bdb3f51a6112e7aa3e279144fcd54 | |
parent | 44a43596c2423493f821ae0884ccabf22b2542bc (diff) | |
download | gst-plugins-bad-34f5ea6d6ed00e85910e70e16a7b27992f31d968.tar.gz gst-plugins-bad-34f5ea6d6ed00e85910e70e16a7b27992f31d968.tar.bz2 gst-plugins-bad-34f5ea6d6ed00e85910e70e16a7b27992f31d968.zip |
get a writable buffer
Original commit message from CVS:
get a writable buffer
-rw-r--r-- | gst/filter/gstbpwsinc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/filter/gstbpwsinc.c b/gst/filter/gstbpwsinc.c index a6aefc6e..916fcbe9 100644 --- a/gst/filter/gstbpwsinc.c +++ b/gst/filter/gstbpwsinc.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); |