fix overflow bug in stream length calculation, debian bug #200435; see http://sourcef...
authorJosh Coalson <jcoalson@users.sourceforce.net>
Tue, 8 Jul 2003 22:05:45 +0000 (22:05 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Tue, 8 Jul 2003 22:05:45 +0000 (22:05 +0000)
src/plugin_xmms/plugin.c

index 9d64738..f696ee0 100644 (file)
@@ -537,7 +537,7 @@ void metadata_callback_(const FLAC__FileDecoder *decoder, const FLAC__StreamMeta
                file_info->bits_per_sample = metadata->data.stream_info.bits_per_sample;
                file_info->channels = metadata->data.stream_info.channels;
                file_info->sample_rate = metadata->data.stream_info.sample_rate;
-               file_info->length_in_msec = file_info->total_samples * 10 / (file_info->sample_rate / 100);
+               file_info->length_in_msec = (FLAC__uint64)file_info->total_samples * 10 / (file_info->sample_rate / 100);
        }
        else if(metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) {
                double gain, peak;