Skip to content

Commit

Permalink
the flac duration reported by the mediascanner needs to be in milisec…
Browse files Browse the repository at this point in the history
…onds, not seconds
  • Loading branch information
nadlabak committed Jun 29, 2010
1 parent 6a1b269 commit 41eac51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion android/mediascanner.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 41eac51

Please sign in to comment.