Permalink
Browse files

the flac duration reported by the mediascanner needs to be in milisec…

…onds, not seconds
  • Loading branch information...
nadlabak committed Jun 29, 2010
1 parent 6a1b269 commit 41eac515afc4bd96a7826f00a2367546cbc1476d
Showing with 1 addition and 1 deletion.
  1. +1 −1 android/mediascanner.cpp
View
@@ -489,7 +489,7 @@ static void flac_metadata(const FLAC__StreamDecoder *decoder, const FLAC__Stream
MediaScannerClient *client = (MediaScannerClient *)client_data;
if (metadata->type == FLAC__METADATA_TYPE_STREAMINFO) {
- FLAC__uint64 duration = metadata->data.stream_info.total_samples / metadata->data.stream_info.sample_rate;
+ FLAC__uint64 duration = 1000 * metadata->data.stream_info.total_samples / metadata->data.stream_info.sample_rate;
if (duration > 0) {
char buffer[20];
sprintf(buffer, "%lld", duration);

0 comments on commit 41eac51

Please sign in to comment.