From 70ea2d756167a07f21cffb2012adb99bee59b468 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Sat, 5 Feb 2005 21:22:47 +0000 Subject: [PATCH] fix divide-by-zero bug. Doh --- src/mp3-scanner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mp3-scanner.c b/src/mp3-scanner.c index 7d755b7e..c632f326 100644 --- a/src/mp3-scanner.c +++ b/src/mp3-scanner.c @@ -1211,7 +1211,7 @@ int scan_get_aacfileinfo(char *file, MP3FILE *pmp3) { atom_offset=aac_drilltoatom(infile,"mdat",&atom_length); - if (atom_offset != -1) { + if ((atom_offset != -1) && (pmp3->song_length)) { pmp3->bitrate = atom_length / ((pmp3->song_length / 1000) * 128); }