From 1c01b50adaed506dbb2127590780e2eaa3fd6f0a Mon Sep 17 00:00:00 2001 From: Bernhard Miller Date: Wed, 15 Apr 2015 11:24:17 +0200 Subject: [PATCH] audioconvert: fix mixed usage of gint and gint32 in int matrix This is a fixup for b2db18cda2e4e7951655cb2a34108a8523b6eca9 audioconvert: avoid float calculations when mixing integer-formatted channels The int matrix was using gint and gint32 synonymously, which can theoretically cause problems if gint and gint32 are actually different types. https://bugzilla.gnome.org/show_bug.cgi?id=747005 --- gst/audioconvert/gstchannelmix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/audioconvert/gstchannelmix.c b/gst/audioconvert/gstchannelmix.c index 5df8d1120e..f144c203e7 100644 --- a/gst/audioconvert/gstchannelmix.c +++ b/gst/audioconvert/gstchannelmix.c @@ -607,10 +607,10 @@ gst_channel_mix_setup_matrix_int (AudioConvertCtx * this) gfloat tmp; gfloat factor = (1 << INT_MATRIX_FACTOR_EXPONENT); - this->matrix_int = g_new0 (gint32 *, this->in.channels); + this->matrix_int = g_new0 (gint *, this->in.channels); for (i = 0; i < this->in.channels; i++) { - this->matrix_int[i] = g_new (gint32, this->out.channels); + this->matrix_int[i] = g_new (gint, this->out.channels); for (j = 0; j < this->out.channels; j++) { tmp = this->matrix[i][j] * factor;