diff --git a/gst/audiofx/audiofxbaseiirfilter.c b/gst/audiofx/audiofxbaseiirfilter.c index 50a00da7c3..1ce4d8bc77 100644 --- a/gst/audiofx/audiofxbaseiirfilter.c +++ b/gst/audiofx/audiofxbaseiirfilter.c @@ -372,7 +372,11 @@ 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); - g_return_val_if_fail (filter->a != NULL, GST_FLOW_ERROR); + 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); diff --git a/gst/audiofx/audioiirfilter.c b/gst/audiofx/audioiirfilter.c index cf3070f155..8f41e43855 100644 --- a/gst/audiofx/audioiirfilter.c +++ b/gst/audiofx/audioiirfilter.c @@ -186,7 +186,7 @@ static void gst_audio_iir_filter_init (GstAudioIIRFilter * self) { GValue v = { 0, }; - GValueArray *a, *b; + GValueArray *a; a = g_value_array_new (1); @@ -195,8 +195,7 @@ gst_audio_iir_filter_init (GstAudioIIRFilter * self) g_value_array_append (a, &v); g_value_unset (&v); - b = NULL; - gst_audio_iir_filter_update_coefficients (self, a, b); + gst_audio_iir_filter_update_coefficients (self, a, a); g_mutex_init (&self->lock); }