On Tue, Jul 08, 2003 at 10:11:49PM +0200, Miroslav Lichvar wrote:

> On Tue, Jul 08, 2003 at 11:07:09AM -0400, Matt Zimmerman wrote:
> > severity 200435 normal
> > thanks
> > 
> > I received this bug report from a Debian user.  I can't think of any reason
> > offhand why the command line tool would work while the xmms plugin would
> > fail.
> ...
> 
> It's an overflow, this patch will fix it. 
> 
> --- plugin.c.orig     2003-05-20 21:57:04.000000000 +0200
> +++ plugin.c  2003-07-08 22:03:37.000000000 +0200
> @@ -537,7 +537,7 @@
>               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;

It seems like would be simpler to do something like:

(file_info->total_samples / file_info->sample_rate) * 1000;

-- 
 - mdz


-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
_______________________________________________
Flac-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/flac-dev

Reply via email to