[gst-devel] patch volume plugin
Jim Thornton
jthornton at parc.com
Fri Mar 22 18:55:03 CET 2002
Fix: don't try to mangle a read-only buffer. This was causing SEGV when
volume fed from wavparse from filesrc (which mmaps the file read-only)
--- gstvolume.c.orig Fri Mar 22 09:14:22 2002
+++ gstvolume.c Fri Mar 22 11:32:51 2002
@@ -253,6 +253,9 @@
g_return_if_fail(filter != NULL);
g_return_if_fail(GST_IS_VOLUME(filter));
+ if (GST_BUFFER_FLAG_IS_SET(buf,GST_BUFFER_READONLY)) {
+ buf = gst_buffer_copy(buf);
+ }
switch (filter->format) {
case GST_VOLUME_FORMAT_INT:
int_data = (gint16 *)GST_BUFFER_DATA(buf);
More information about the gstreamer-devel
mailing list