[ogg-dev] Decoding setup header

Ralph Giles giles at xiph.org
Fri Jul 17 12:48:27 PDT 2009


On Fri, Jul 17, 2009 at 12:08 PM, Adam Rosi-Kessel<adam at rosi-kessel.org> wrote:

> In my ongoing quest to restore corrupted ogg files, I'm trying to find
> an easy way to identify the setup header without having to actually
> decode it. I understand that it starts with [packet_type] = 5 and then
> the string 'vorbis', but is there some way to figure out where it
> terminates without actually decoding the bits?

No. The first header is fixed length the second two are variable. It
should be immediately followed by a new page header though; if there's
no corruption you could try that.

 -r


More information about the ogg-dev mailing list