Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: OggVorbis Comments support Padding ? (Read 4741 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

OggVorbis Comments support Padding ?

My library was having problems reading an OggVorbis File and the problem appears to be there is padding at the end of the VorbisComment. I wasnt expecting this (there is no mention of padding in the spec) and my code fails because I check for the Framing Bit >0 at the end of the packet (at the last byte of the padding) rather than immediately after the last comment, of course without padding this is the same byte.

But what are the rules of padding, there is no mention of it in the VorbisComment, though I found this post that mentions padding:
http://www.hydrogenaudio.org/forums/index....showtopic=36921

OggVorbis Comments support Padding ?

Reply #1
bump..

 

OggVorbis Comments support Padding ?

Reply #2
The spec doesn't say that the "framing bit" is always at a packet's end. It just directly follows your data. If a packet is padded then the framing bit won't be part of the last byte anymore. This is still within the spec and should not break decoders. You should update your code.

Cheers!
SG

OggVorbis Comments support Padding ?

Reply #3
The spec doesn't say that the "framing bit" is always at a packet's end. It just directly follows your data. If a packet is padded then the framing bit won't be part of the last byte anymore. This is still within the spec and should not break decoders. You should update your code.

Cheers!
SG

Hi, sorry I wasnt clear I have already updated my code so it checks the packets end and it works. But I wanted to know about the use of padding as padding is not mentioned anywhere.