QUOTE(paultaylor @ Aug 9 2007, 22:32)

Hi ive read and reread the ogg and vorbis documents on Xiph.org but Im still unsure about a couple of terms.
When using Ogg Vorbis what exactly is a packet, is it eight bits (an octet), or are there three packets (the Identification packet, Vorbis Comment packet and Audio Packet).
I was also confused about this at first. A packet is a block of data of arbitrary length, padded to an integral number of bytes. To find the size, look at the segment table. Lets say it contains 12 entries (called lacing values), and the value of the first 4 entries are 255, 255, 255 and 135. That means the first packet on that page is 255 * 3 + 135 (i.e., 900) bytes.
QUOTE
I understand that Vorbis Comment can span multiple pages but how do you detect this. I thought I could look for where the Ogg Page header type flag was 1, and carry on reading pageheaders until the header type is zero, but oce I get one page with a header flag=1, they seem to continue with a flag=1 until the very last frame.
The continue bit indicates that a packet continues from the previous page, but it doesn't say anything about which packet...
Again, look at the segment table. The end of a packet is marked with an entry that is less than 255. If the table ends with a 255 value, it means the packet continues on the next page (and that page should have the continued flag set).