[Vorbis] a question about ov_read()

xiphmont at xiph.org xiphmont at xiph.org
Mon Apr 5 13:21:53 PDT 2010


On Wed, Feb 3, 2010 at 11:41 AM, Dmitry Goncharov <dgoncharov at unison.com> wrote:
> Hi,
> Is the following assumption correct?
>
>
> OggVorbis_File f;
> if (ov_read(&f, ...) == 0)
> {
>     assert(ov_pcm_tell(&f) == ov_pcm_total(&f, -1));
> }

Reading straight through the file, that should be true.  I don't know
if it will be true in the case of raw seeking nearly to the end of a
file and trying to read past the beginning of the last page.  I think
that would possibly be the only case where it would not be true,
because it would not be possible to recapture the stream at that
point.

Monty


More information about the Vorbis mailing list