mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
audioconvert: fix mixed usage of gint and gint32 in int matrix
This is a fixup for b2db18cda2
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
This commit is contained in:
parent
dc4e517dc6
commit
1c01b50ada
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue