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);