summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2012-02-17 23:49:21 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2012-02-17 23:49:21 +0100
commit82a43ad1ab6d206822259aa23335a791370bb97f (patch)
tree0e5bdcb464504827e81f5b4c014e2067aaecff0d
parentfdfe4ed445ee4df20675abe0289fee6817bef4e1 (diff)
parentf76f7374ea2227b8422aa6c3b1e084fff0180d0a (diff)
Merge branch 'master' into 0.11
Conflicts: gst/equalizer/gstiirequalizer.c
-rw-r--r--gst/audioparsers/gstmpegaudioparse.c4
-rw-r--r--gst/equalizer/gstiirequalizer.c11
2 files changed, 10 insertions, 5 deletions
diff --git a/gst/audioparsers/gstmpegaudioparse.c b/gst/audioparsers/gstmpegaudioparse.c
index 1cc9f64e20..7566c03d32 100644
--- a/gst/audioparsers/gstmpegaudioparse.c
+++ b/gst/audioparsers/gstmpegaudioparse.c
@@ -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;
diff --git a/gst/equalizer/gstiirequalizer.c b/gst/equalizer/gstiirequalizer.c
index be903066a4..ac20f352d8 100644
--- a/gst/equalizer/gstiirequalizer.c
+++ b/gst/equalizer/gstiirequalizer.c
@@ -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);
}