Skip to main content

Topic: OggVorbis Comments support Padding ? (Read 3428 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • paultaylor
  • [*][*][*]
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

  • paultaylor
  • [*][*][*]
OggVorbis Comments support Padding ?
Reply #1
bump..

  • SebastianG
  • [*][*][*][*][*]
  • Developer
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

  • paultaylor
  • [*][*][*]
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.