From: Sebastian Dröge Date: Wed, 21 May 2008 07:28:04 +0000 (+0000) Subject: gst/audioconvert/gstchannelmix.c: Prevent division by zero if the channel mix matrix... X-Git-Tag: 1.19.3~511^2~10472 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d47bd6d7bcb028453810b6dd68137ae6050ce64c;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/ChangeLog b/ChangeLog index 269412d..48b9aaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-05-21 Sebastian Dröge + * 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 + Patch by: Antoine Tremblay * gst/gdp/gstgdppay.c: (gst_gdp_pay_chain): diff --git a/gst/audioconvert/gstchannelmix.c b/gst/audioconvert/gstchannelmix.c index 98648db..063c496 100644 --- a/gst/audioconvert/gstchannelmix.c +++ b/gst/audioconvert/gstchannelmix.c @@ -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;