From 1bed6cbedd3a0607ea598fefd25f8778dfe9761d Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 25 Jul 2002 18:59:41 +0000 Subject: [PATCH] Fix: use gst_buffer_copy_on_write() instead of incorrect copying if READONLY. Original commit message from CVS: Fix: use gst_buffer_copy_on_write() instead of incorrect copying if READONLY. --- gst/volume/gstvolume.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c index 2dc9ad2..3a050b4 100644 --- a/gst/volume/gstvolume.c +++ b/gst/volume/gstvolume.c @@ -275,13 +275,7 @@ volume_chain_float (GstPad *pad, GstBuffer *buf) filter = GST_VOLUME(GST_OBJECT_PARENT (pad)); g_return_if_fail(GST_IS_VOLUME(filter)); - if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_READONLY)){ - out_buf = gst_buffer_copy (buf); - gst_buffer_unref(buf); - } - else { - out_buf = buf; - } + out_buf = gst_buffer_copy_on_write (buf); data = (gfloat *)GST_BUFFER_DATA(out_buf); num_samples = GST_BUFFER_SIZE(out_buf)/sizeof(gfloat); -- 2.7.4