set_elapsed() bug fix by Simon Elén

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3041 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2003-01-09 01:02:40 +00:00
parent c78e1b07fe
commit 989a3ec28c

View file

@ -342,7 +342,7 @@ static void set_elapsed(struct mp3entry* id3)
}
else {
/* no TOC exists. set a rough estimate using average bitrate */
int tpk = (id3->filesize / 1024) / id3->length;
int tpk = id3->length / (id3->filesize / 1024);
id3->elapsed = id3->offset * tpk / 1024;
}
}