[vorbis-dev] Bug in vorbisfile.c?

Brian Hook brianhook at pyrogon.com
Thu Mar 21 18:52:52 PST 2002



I'm using RC1 right now (I think...switching to the new stuff would
impact my code pretty badly I think, which is why I haven't bothered
changing over).

Anyway, I'm hitting an infinite loop and I don't know if this is me
screwing up or a bug in vorbis -- it only happens on my PowerMac (OS X),
and only when I made some changes recently to the rest of my code base.

The code is in ov_read, where it does this:

if ( samples>length/bytespersample) samples = length/bytespersample;

I call the function with "length" 2.  samples is set to 32, and
bytespersample is 4 (words*channels=2*2), which evaluates to:

if ( 32 > 0 ) samples = 0;

So samples is set to "0", and thus ov_read will always return 0 with
that particular input.

Is this a result of me doing something wrong/not understanding how it's
supposed to work, or is it an actual bug?

Thanks,

Brian

P.S. Forgot to mention, but Candy Cruncher is out for Linux and uses Ogg
Vorbis again....we've also got builds working (but not released) for
MacOS and BeOS

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list