After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 737886 - equalizer: crash when changing equalizer settings during playback
equalizer: crash when changing equalizer settings during playback
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.4.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-04 14:04 UTC by David Sansome
Modified: 2014-10-24 19:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes the crash by checking if the buffer is writeable before mapping it for writing. (1.43 KB, patch)
2014-10-04 14:05 UTC, David Sansome
needs-work Details | Review
Set transform_ip_on_passthrough = FALSE instead. (1.41 KB, patch)
2014-10-11 00:26 UTC, David Sansome
committed Details | Review

Description David Sansome 2014-10-04 14:04:50 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.
Comment 1 David Sansome 2014-10-04 14:05:25 UTC
Created attachment 287713 [details] [review]
Fixes the crash by checking if the buffer is writeable before mapping it for writing.
Comment 2 Sebastian Dröge (slomo) 2014-10-07 12:17:06 UTC
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?
Comment 3 David Sansome 2014-10-11 00:26:28 UTC
Created attachment 288263 [details] [review]
Set transform_ip_on_passthrough = FALSE instead.

Oh yeah that's a much better solution, thanks!
Comment 4 Sebastian Dröge (slomo) 2014-10-13 06:30:25 UTC
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
Comment 5 Tim-Philipp Müller 2014-10-24 19:55:55 UTC
Cherry-picked into 1.4 branch as well.