GNOME Bugzilla – Bug 737886
equalizer: crash when changing equalizer settings during playback
Last modified: 2014-10-24 19:55:55 UTC
Reported by a Clementine user: https://github.com/clementine-player/Clementine/issues/4541 The problem is the gst_buffer_map (buf, &map, GST_MAP_READWRITE) in gstiirequalizer.c - it's just switched out of passthrough mode, but the buffer was allocated while the transform was still in passthrough mode and it's read-only (GstBaseTransform just gives it a copy of the input buffer as an optimisation). It'll be writeable on the next call to transform_ip.
Created attachment 287713 [details] [review] Fixes the crash by checking if the buffer is writeable before mapping it for writing.
Just making the buffer writable there is not going to work. I think the correct fix would be to set GstBaseTransform::transform_ip_on_passthrough to FALSE (in class_init). Do you want to update your patch?
Created attachment 288263 [details] [review] Set transform_ip_on_passthrough = FALSE instead. Oh yeah that's a much better solution, thanks!
commit 8154c90c9bd1563b9abb6ce61b5241cd82ec8826 Author: David Sansome <me@davidsansome.com> Date: Sat Oct 11 11:18:42 2014 +1100 equalizer: Don't call iirequalizer's transform_ip in passthrough mode It tries to map the read-only buffer with GST_MAP_READWRITE and crashes. https://bugzilla.gnome.org/show_bug.cgi?id=737886
Cherry-picked into 1.4 branch as well.