mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
audiofxbaseiirfilter: check if coefficients are provided inside filter lock
https://bugzilla.gnome.org/show_bug.cgi?id=719524
This commit is contained in:
parent
5535a824a4
commit
7a65277119
1 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue