summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/codecs/flac.c3
-rw-r--r--apps/metadata/flac.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/apps/codecs/flac.c b/apps/codecs/flac.c
index cc3f683706..3f2f369a88 100644
--- a/apps/codecs/flac.c
+++ b/apps/codecs/flac.c
@@ -172,7 +172,8 @@ static bool flac_init(FLACContext* fc, int first_frame_offset)
172 } 172 }
173 173
174 if (found_streaminfo) { 174 if (found_streaminfo) {
175 fc->bitrate = ((fc->filesize-fc->metadatalength) * 8) / fc->length; 175 fc->bitrate = ((int64_t) (fc->filesize-fc->metadatalength) * 8)
176 / fc->length;
176 return true; 177 return true;
177 } else { 178 } else {
178 return false; 179 return false;
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)
96 return false; 96 return false;
97 } 97 }
98 98
99 id3->bitrate = (id3->filesize * 8) / id3->length; 99 id3->bitrate = ((int64_t) id3->filesize * 8) / id3->length;
100 } 100 }
101 else if (type == 4) /* 4 is the VORBIS_COMMENT block */ 101 else if (type == 4) /* 4 is the VORBIS_COMMENT block */
102 { 102 {