From 7f971e017670880685be276898ec80189ee0940b Mon Sep 17 00:00:00 2001 From: Boris Gjenero Date: Sat, 8 Aug 2009 20:27:03 +0000 Subject: Fix FS#10476. Prevent FLAC bitrate calculation overflow with large files. The watermark depends on the bitrate, and so this also fixes playback pauses on large FLAC files. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22211 a1c6a512-1295-4272-9138-f99709370657 --- apps/metadata/flac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/metadata/flac.c') diff --git a/apps/metadata/flac.c b/apps/metadata/flac.c index 21ecdd61ca..b8f440c3ed 100644 --- a/apps/metadata/flac.c +++ b/apps/metadata/flac.c @@ -96,7 +96,7 @@ bool get_flac_metadata(int fd, struct mp3entry* id3) return false; } - id3->bitrate = (id3->filesize * 8) / id3->length; + id3->bitrate = ((int64_t) id3->filesize * 8) / id3->length; } else if (type == 4) /* 4 is the VORBIS_COMMENT block */ { -- cgit v1.2.3