diff --git a/src/scan-aac.c b/src/scan-aac.c index 4552d605..c5f572d9 100644 --- a/src/scan-aac.c +++ b/src/scan-aac.c @@ -388,7 +388,7 @@ int scan_get_aacinfo(char *filename, MP3FILE *pmp3) { /* calculate bitrate from song length... Kinda cheesy */ DPRINTF(E_DBG,L_SCAN, "Guesstimating bit rate.\n"); atom_offset=scan_aac_drilltoatom(fin,"mdat",&atom_length); - if ((atom_offset != -1) && (pmp3->song_length)) { + if ((atom_offset != -1) && (pmp3->song_length >= 1000)) { pmp3->bitrate = atom_length / ((pmp3->song_length / 1000) * 128); } } diff --git a/src/scan-mp4.c b/src/scan-mp4.c index 54890287..a1e2cc52 100644 --- a/src/scan-mp4.c +++ b/src/scan-mp4.c @@ -263,7 +263,7 @@ int scan_get_mp4info(char *filename, MP3FILE *pmp3) { /* calculate bitrate from song length... Kinda cheesy */ DPRINTF(E_DBG,L_SCAN, "Guesstimating bit rate.\n"); atom_offset=scan_aac_drilltoatom(fin,"mdat",&atom_length); - if ((atom_offset != -1) && (pmp3->song_length)) { + if ((atom_offset != -1) && (pmp3->song_length > 1000)) { pmp3->bitrate = atom_length / ((pmp3->song_length / 1000) * 128); } }