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
This commit is contained in:
David Sansome 2014-10-11 11:18:42 +11:00 committed by Sebastian Dröge
parent 51a8bedced
commit 8154c90c9b

View file

@ -362,6 +362,7 @@ gst_iir_equalizer_class_init (GstIirEqualizerClass * klass)
gobject_class->finalize = gst_iir_equalizer_finalize; gobject_class->finalize = gst_iir_equalizer_finalize;
audio_filter_class->setup = gst_iir_equalizer_setup; audio_filter_class->setup = gst_iir_equalizer_setup;
btrans_class->transform_ip = gst_iir_equalizer_transform_ip; btrans_class->transform_ip = gst_iir_equalizer_transform_ip;
btrans_class->transform_ip_on_passthrough = FALSE;
caps = gst_caps_from_string (ALLOWED_CAPS); caps = gst_caps_from_string (ALLOWED_CAPS);
gst_audio_filter_class_add_pad_templates (audio_filter_class, caps); gst_audio_filter_class_add_pad_templates (audio_filter_class, caps);
@ -831,9 +832,6 @@ gst_iir_equalizer_transform_ip (GstBaseTransform * btrans, GstBuffer * buf)
need_new_coefficients = equ->need_new_coefficients; need_new_coefficients = equ->need_new_coefficients;
BANDS_UNLOCK (equ); BANDS_UNLOCK (equ);
if (!need_new_coefficients && gst_base_transform_is_passthrough (btrans))
return GST_FLOW_OK;
timestamp = GST_BUFFER_TIMESTAMP (buf); timestamp = GST_BUFFER_TIMESTAMP (buf);
timestamp = timestamp =
gst_segment_to_stream_time (&btrans->segment, GST_FORMAT_TIME, timestamp); gst_segment_to_stream_time (&btrans->segment, GST_FORMAT_TIME, timestamp);