Merge branch 'master' into 0.11

Conflicts:
	gst/equalizer/gstiirequalizer.c
This commit is contained in:
Wim Taymans 2012-02-17 23:49:21 +01:00
commit 82a43ad1ab
2 changed files with 10 additions and 5 deletions

View file

@ -855,9 +855,7 @@ gst_mpeg_audio_parse_handle_first_frame (GstMpegAudioParse * mp3parse,
GST_DEBUG_OBJECT (mp3parse, "Encoder delay %u, encoder padding %u",
encoder_delay, encoder_padding);
}
}
if (read_id_vbri == vbri_id) {
} else if (read_id_vbri == vbri_id) {
gint64 total_bytes, total_frames;
GstClockTime total_time;
guint16 nseek_points;

View file

@ -822,11 +822,16 @@ gst_iir_equalizer_transform_ip (GstBaseTransform * btrans, GstBuffer * buf)
GstClockTime timestamp;
GstMapInfo map;
gint channels = GST_AUDIO_FILTER_CHANNELS (filter);
gboolean need_new_coefficients;
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);
@ -838,14 +843,16 @@ gst_iir_equalizer_transform_ip (GstBaseTransform * btrans, GstBuffer * buf)
guint f, nf = equ->freq_band_count;
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 (GST_OBJECT (filters[f]), timestamp);
}
}
BANDS_LOCK (equ);
if (equ->need_new_coefficients) {
if (need_new_coefficients) {
update_coefficients (equ);
set_passthrough (equ);
}