diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2006-04-02 20:19:00 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-04-02 20:19:00 +0000 |
| commit | 93b6a1d12c31a601df6b548bda81e3c40f431c47 (patch) | |
| tree | 88e25758af6c67e1eb62bdc2223fc327ebf058a9 /apps/dsp.c | |
| parent | ea6b4cbe4f10751087a64a13ff5d44837862cef3 (diff) | |
| download | rockbox-93b6a1d12c31a601df6b548bda81e3c40f431c47.zip rockbox-93b6a1d12c31a601df6b548bda81e3c40f431c47.tar.gz rockbox-93b6a1d12c31a601df6b548bda81e3c40f431c47.tar.bz2 rockbox-93b6a1d12c31a601df6b548bda81e3c40f431c47.tar.xz | |
Prevent two division by zeros and one problem causing a crash in the
mp3 metadata parser.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9438 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/dsp.c')
| -rw-r--r-- | apps/dsp.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -629,7 +629,10 @@ void dsp_set_eq_coefs(int band) cutoff = 0xffffffff / NATIVE_FREQUENCY * (*setting++); q = ((*setting++) << 16) / 10; /* 16.16 */ gain = ((*setting++) << 16) / 10; /* s15.16 */ - + + if (q == 0) + q = 1; + /* The coef functions assume the EMAC unit is in fractional mode */ #if defined(CPU_COLDFIRE) && !defined(SIMULATOR) /* set emac unit for dsp processing, and save old macsr, we're running in |