mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +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>
|
||||
|
||||
Patch by: Antoine Tremblay <hexa00 at gmail dot com>
|
||||
|
|
|
@ -449,6 +449,9 @@ gst_channel_mix_fill_normalize (AudioConvertCtx * this)
|
|||
}
|
||||
|
||||
/* normalize to this */
|
||||
if (top == 0.0)
|
||||
return;
|
||||
|
||||
for (j = 0; j < this->out.channels; j++) {
|
||||
for (i = 0; i < this->in.channels; i++) {
|
||||
this->matrix[i][j] /= top;
|
||||
|
|
Loading…
Reference in a new issue