Commit 25348260 authored by Michael Smith's avatar Michael Smith
Browse files

gcc 3.x was miscompiling this function at -O2 and above. Rearrange things

to make it get it right.

svn path=/trunk/vorbis/; revision=4054
parent ed69b103
......@@ -11,7 +11,7 @@
function: stdio-based convenience library for opening/seeking/decoding
last mod: $Id: vorbisfile.c,v 1.63 2002/10/11 08:22:18 xiphmont Exp $
last mod: $Id: vorbisfile.c,v 1.64 2002/10/26 13:37:03 msmith Exp $
......@@ -782,9 +782,15 @@ long ov_bitrate(OggVorbis_File *vf,int i){
ogg_int64_t bits=0;
int i;
float br;
/* This once read: return(rint(bits/ov_time_total(vf,-1)));
* gcc 3.x on x86 miscompiled this at optimisation level 2 and above,
* so this is slightly transformed to make it work.
br = bits/ov_time_total(vf,-1);
/* return the actual bitrate */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment