[ogg-dev] What does oggz_tell() actually return?

Pauli Ojala pauli at lacquer.fi
Fri Jan 29 15:10:40 PST 2010

Hello all,

I'm trying to use liboggz to parse and display Ogg media files. I'm  
wondering what the return value of oggz_tell() actually is and how is  
one supposed to use it.

The documentation says that oggz_tell() returns "the current offset of  
oggz". This sounds like it would be basically the file position  
indicator, and could be used to seek within the Ogg file to a specific  
byte position.

The problem is that the values actually returned by this function  
extend way beyond the file's length. Is there some constant by which I  
should scale these values to make them usable?

(To narrow down the problem, I modified oggz_tell() to print the  
result of a plain ftello(oggz->file) call. Here's an example value  
illustrating the problem: ftello() says the file position is 384000,  
but oggz_tell() returns 3623387. For the last packet in the file,  
ftello() reports 8322048, while oggz_tell() says 79363430... Where  
does this multiplier of roughly 9.5 come from?)

Pauli Ojala
Lacquer oy/ltd
pauli at lacquer.fi

More information about the ogg-dev mailing list