Merge branch 'master' into 0.11
authorWim Taymans <wim.taymans@collabora.co.uk>
Fri, 17 Feb 2012 22:49:21 +0000 (23:49 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Fri, 17 Feb 2012 22:49:21 +0000 (23:49 +0100)
Conflicts:
gst/equalizer/gstiirequalizer.c

1  2 
gst/audioparsers/gstmpegaudioparse.c
gst/equalizer/gstiirequalizer.c

Simple merge
@@@ -820,13 -834,16 +820,18 @@@ gst_iir_equalizer_transform_ip (GstBase
    GstAudioFilter *filter = GST_AUDIO_FILTER (btrans);
    GstIirEqualizer *equ = GST_IIR_EQUALIZER (btrans);
    GstClockTime timestamp;
 +  GstMapInfo map;
 +  gint channels = GST_AUDIO_FILTER_CHANNELS (filter);
+   gboolean need_new_coefficients;
  
 -  if (G_UNLIKELY (filter->format.channels < 1 || equ->process == NULL))
 +  if (G_UNLIKELY (channels < 1 || equ->process == NULL))
      return GST_FLOW_NOT_NEGOTIATED;
  
-   if (gst_base_transform_is_passthrough (btrans))
+   BANDS_LOCK (equ);
+   need_new_coefficients = equ->need_new_coefficients;
+   BANDS_UNLOCK (equ);
+   if (!need_new_coefficients && gst_base_transform_is_passthrough (btrans))
      return GST_FLOW_OK;
  
    timestamp = GST_BUFFER_TIMESTAMP (buf);
      GstIirEqualizerBand **filters = equ->bands;
      guint f, nf = equ->freq_band_count;
  
 -    gst_object_sync_values (G_OBJECT (equ), timestamp);
 +    gst_object_sync_values (GST_OBJECT (equ), timestamp);
      /* sync values for bands too */
+     /* FIXME: iterating equ->bands is not thread-safe here */
      for (f = 0; f < nf; f++) {
 -      gst_object_sync_values (G_OBJECT (filters[f]), timestamp);
 +      gst_object_sync_values (GST_OBJECT (filters[f]), timestamp);
      }
    }