From fa0a5a667f5dd1df04970fff881df160d03b08a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Wed, 8 Jul 2009 15:08:32 +0200 Subject: [PATCH] audioconvert: Fix compilation when debugging is disabled Fixes bug #587980. --- gst/audioconvert/gstchannelmix.c | 34 ++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/gst/audioconvert/gstchannelmix.c b/gst/audioconvert/gstchannelmix.c index 0f9b945d2f..1dbfcce75b 100644 --- a/gst/audioconvert/gstchannelmix.c +++ b/gst/audioconvert/gstchannelmix.c @@ -596,7 +596,6 @@ void gst_channel_mix_setup_matrix (AudioConvertCtx * this) { gint i, j; - GString *s; /* don't lose memory */ gst_channel_mix_unset_matrix (this); @@ -619,25 +618,30 @@ gst_channel_mix_setup_matrix (AudioConvertCtx * this) /* setup the matrix' internal values */ gst_channel_mix_fill_matrix (this); +#ifndef GST_DISABLE_GST_DEBUG /* debug */ - s = g_string_new ("Matrix for"); - g_string_append_printf (s, " %d -> %d: ", - this->in.channels, this->out.channels); - g_string_append (s, "{"); - for (i = 0; i < this->in.channels; i++) { - if (i != 0) - g_string_append (s, ","); - g_string_append (s, " {"); - for (j = 0; j < this->out.channels; j++) { - if (j != 0) + { + GString *s; + s = g_string_new ("Matrix for"); + g_string_append_printf (s, " %d -> %d: ", + this->in.channels, this->out.channels); + g_string_append (s, "{"); + for (i = 0; i < this->in.channels; i++) { + if (i != 0) g_string_append (s, ","); - g_string_append_printf (s, " %f", this->matrix[i][j]); + g_string_append (s, " {"); + for (j = 0; j < this->out.channels; j++) { + if (j != 0) + g_string_append (s, ","); + g_string_append_printf (s, " %f", this->matrix[i][j]); + } + g_string_append (s, " }"); } g_string_append (s, " }"); + GST_DEBUG (s->str); + g_string_free (s, TRUE); } - g_string_append (s, " }"); - GST_DEBUG (s->str); - g_string_free (s, TRUE); +#endif } gboolean