diff --git a/gst/audiofx/audiofxbaseiirfilter.c b/gst/audiofx/audiofxbaseiirfilter.c index 1ce4d8bc77..93553e8fe9 100644 --- a/gst/audiofx/audiofxbaseiirfilter.c +++ b/gst/audiofx/audiofxbaseiirfilter.c @@ -372,16 +372,16 @@ gst_audio_fx_base_iir_filter_transform_ip (GstBaseTransform * base, if (GST_CLOCK_TIME_IS_VALID (stream_time)) gst_object_sync_values (GST_OBJECT (filter), stream_time); - if (filter->a == NULL || filter->b == NULL) { - g_return_val_if_fail (filter->a != NULL - && filter->b != NULL, GST_FLOW_ERROR); - return GST_FLOW_ERROR; - } - gst_buffer_map (buf, &map, GST_MAP_READWRITE); num_samples = map.size / GST_AUDIO_FILTER_BPS (filter); g_mutex_lock (&filter->lock); + if (filter->a == NULL || filter->b == NULL) { + g_warn_if_fail (filter->a != NULL && filter->b != NULL); + gst_buffer_unmap (buf, &map); + g_mutex_unlock (&filter->lock); + return GST_FLOW_ERROR; + } filter->process (filter, map.data, num_samples); g_mutex_unlock (&filter->lock);