mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
Fix: don't try to mangle a read-only buffer. This was causing SEGV when volume fed from wavparse from filesrc (which...
Original commit message from CVS: patch from jim thornton <jthornton@parc.com>: 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)
This commit is contained in:
parent
2d698ba7d2
commit
29487094cc
2 changed files with 5 additions and 1 deletions
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 38267abf56a3428093cea71429dca6a24a927547
|
||||
Subproject commit 6148068f2318e85d8e66df485342b630d8fb49ac
|
|
@ -255,6 +255,9 @@ volume_chain (GstPad *pad, GstBuffer *buf)
|
|||
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);
|
||||
|
@ -314,6 +317,7 @@ volume_set_property (GObject *object, guint prop_id, const GValue *value, GParam
|
|||
filter->volume_i = filter->volume_f*8192;
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue