summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/codecs/flac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/codecs/flac.c b/apps/codecs/flac.c
index 00d2c16993..cc3f683706 100644
--- a/apps/codecs/flac.c
+++ b/apps/codecs/flac.c
@@ -133,7 +133,7 @@ static bool flac_init(FLACContext* fc, int first_frame_offset)
133 133
134 /* Calculate track length (in ms) and estimate the bitrate 134 /* Calculate track length (in ms) and estimate the bitrate
135 (in kbit/s) */ 135 (in kbit/s) */
136 fc->length = (fc->totalsamples / fc->samplerate) * 1000; 136 fc->length = ((int64_t) fc->totalsamples * 1000) / fc->samplerate;
137 137
138 found_streaminfo=true; 138 found_streaminfo=true;
139 } else if ((buf[0] & 0x7f) == 3) { /* 3 is the SEEKTABLE block */ 139 } else if ((buf[0] & 0x7f) == 3) { /* 3 is the SEEKTABLE block */