From 5cb42081a5c401192cc5b2897181eb05e260adab Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Fri, 17 Feb 2012 13:26:53 +0100 Subject: [PATCH 1/2] mpegaudioparse: parse either Xing or VBRI data ... and avoid confusing debug message claiming neither present. --- gst/audioparsers/gstmpegaudioparse.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gst/audioparsers/gstmpegaudioparse.c b/gst/audioparsers/gstmpegaudioparse.c index 2381fc36d0..efb97587ad 100644 --- a/gst/audioparsers/gstmpegaudioparse.c +++ b/gst/audioparsers/gstmpegaudioparse.c @@ -791,9 +791,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; From f76f7374ea2227b8422aa6c3b1e084fff0180d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 17 Feb 2012 17:21:53 +0000 Subject: [PATCH 2/2] equalizer: fix switching from passthrough to non-passthrough when parameters change commit b5bf0294 moved the if(need_new_coefficients) set_passthrough(equ) after the if(is_passthrough) return FLOW_OK shortcut, so the passthrough mode would never get updated even if the coefficients change. Fixes equalizer-test doing .. nothing. --- gst/equalizer/gstiirequalizer.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gst/equalizer/gstiirequalizer.c b/gst/equalizer/gstiirequalizer.c index d66db1a4d0..ffd2c43484 100644 --- a/gst/equalizer/gstiirequalizer.c +++ b/gst/equalizer/gstiirequalizer.c @@ -834,11 +834,16 @@ gst_iir_equalizer_transform_ip (GstBaseTransform * btrans, GstBuffer * buf) GstAudioFilter *filter = GST_AUDIO_FILTER (btrans); GstIirEqualizer *equ = GST_IIR_EQUALIZER (btrans); GstClockTime timestamp; + gboolean need_new_coefficients; if (G_UNLIKELY (filter->format.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); @@ -850,14 +855,16 @@ gst_iir_equalizer_transform_ip (GstBaseTransform * btrans, GstBuffer * buf) guint f, nf = equ->freq_band_count; gst_object_sync_values (G_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); } } BANDS_LOCK (equ); - if (equ->need_new_coefficients) { + if (need_new_coefficients) { update_coefficients (equ); set_passthrough (equ); }