mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
gst/audioconvert/gstchannelmix.c: Prevent division by zero if the channel mix matrix contains only zeroes.
Original commit message from CVS: * gst/audioconvert/gstchannelmix.c: (gst_channel_mix_fill_normalize): Prevent division by zero if the channel mix matrix contains only zeroes.
This commit is contained in:
parent
a8dda35c1b
commit
d47bd6d7bc
2 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2008-05-21 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
|
* gst/audioconvert/gstchannelmix.c:
|
||||||
|
(gst_channel_mix_fill_normalize):
|
||||||
|
Prevent division by zero if the channel mix matrix contains only
|
||||||
|
zeroes.
|
||||||
|
|
||||||
2008-05-21 Sebastian Dröge <slomo@circular-chaos.org>
|
2008-05-21 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
Patch by: Antoine Tremblay <hexa00 at gmail dot com>
|
Patch by: Antoine Tremblay <hexa00 at gmail dot com>
|
||||||
|
|
|
@ -449,6 +449,9 @@ gst_channel_mix_fill_normalize (AudioConvertCtx * this)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* normalize to this */
|
/* normalize to this */
|
||||||
|
if (top == 0.0)
|
||||||
|
return;
|
||||||
|
|
||||||
for (j = 0; j < this->out.channels; j++) {
|
for (j = 0; j < this->out.channels; j++) {
|
||||||
for (i = 0; i < this->in.channels; i++) {
|
for (i = 0; i < this->in.channels; i++) {
|
||||||
this->matrix[i][j] /= top;
|
this->matrix[i][j] /= top;
|
||||||
|
|
Loading…
Reference in a new issue