add VORBIS_COMMENT metadata block
diff --git a/doc/format.html b/doc/format.html
index 7a072c1..2171981 100644
--- a/doc/format.html
+++ b/doc/format.html
@@ -390,7 +390,10 @@
<TT>3</TT> : SEEKTABLE
</LI>
<LI>
- <TT>3-127</TT> : reserved
+ <TT>4</TT> : VORBIS_COMMENT
+ </LI>
+ <LI>
+ <TT>5-127</TT> : reserved
</LI>
</UL>
</TD>
@@ -417,7 +420,7 @@
</TR>
<TR>
<TD ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
- <A HREF="#metadata_block_streaminfo"><I>METADATA_BLOCK_STREAMINFO</I></A><BR>|| <A HREF="#metadata_block_padding"><I>METADATA_BLOCK_PADDING</I></A><BR>|| <A HREF="#metadata_block_application"><I>METADATA_BLOCK_APPLICATION</I></A><BR>|| <A HREF="#metadata_block_seektable"><I>METADATA_BLOCK_SEEKTABLE</I></A>
+ <A HREF="#metadata_block_streaminfo"><I>METADATA_BLOCK_STREAMINFO</I></A><BR>|| <A HREF="#metadata_block_padding"><I>METADATA_BLOCK_PADDING</I></A><BR>|| <A HREF="#metadata_block_application"><I>METADATA_BLOCK_APPLICATION</I></A><BR>|| <A HREF="#metadata_block_seektable"><I>METADATA_BLOCK_SEEKTABLE</I></A><BR>|| <A HREF="#metadata_block_vorbis_comment"><I>METADATA_BLOCK_VORBIS_COMMENT</I></A>
</TD>
<TD>
The block data must match the block type in the block header.
@@ -662,6 +665,26 @@
<P>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#EEEED4"><TR><TD>
+ <TABLE WIDTH="100%" BORDER="1">
+ <TR>
+ <TD COLSPAN="2" BGCOLOR="#D3D4C5">
+ <A NAME="metadata_block_vorbis_comment"><FONT SIZE="+1"><B>METADATA_BLOCK_VORBIS_COMMENT</B></FONT></A>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#F4F4CC">
+ <n>
+ </TD>
+ <TD>
+ The contents of a vorbis comment packet as specified <A HREF="http://www.xiph.org/ogg/vorbis/doc/v-comment.html">here</A>, including the vendor string. Note that the vorbis comment spec allows for on the order of 2 ^ 64 bytes of data where as the FLAC metadata block is limited to 2 ^ 24 bytes. Given the stated purpose of vorbis comments, i.e. human-readable textual information, this limit is unlikely to be restrictive.
+ </TD>
+ </TR>
+ </TABLE>
+ </TD></TR></TABLE>
+ </P>
+
+ <P>
+ <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#EEEED4"><TR><TD>
<TABLE WIDTH="100%" BORDER="1" BGCOLOR="#EEEED4">
<TR>
<TD COLSPAN="2" BGCOLOR="#D3D4C5">
diff --git a/include/FLAC/format.h b/include/FLAC/format.h
index b1f4f60..c43b1bd 100644
--- a/include/FLAC/format.h
+++ b/include/FLAC/format.h
@@ -330,7 +330,8 @@
FLAC__METADATA_TYPE_STREAMINFO = 0,
FLAC__METADATA_TYPE_PADDING = 1,
FLAC__METADATA_TYPE_APPLICATION = 2,
- FLAC__METADATA_TYPE_SEEKTABLE = 3
+ FLAC__METADATA_TYPE_SEEKTABLE = 3,
+ FLAC__METADATA_TYPE_VORBIS_COMMENT = 4
} FLAC__MetaDataType;
extern const char *FLAC__MetaDataTypeString[];
diff --git a/src/libFLAC/format.c b/src/libFLAC/format.c
index 060c667..25f7f8d 100644
--- a/src/libFLAC/format.c
+++ b/src/libFLAC/format.c
@@ -106,5 +106,6 @@
"STREAMINFO",
"PADDING",
"APPLICATION",
- "SEEKTABLE"
+ "SEEKTABLE",
+ "VORBIS_COMMENT"
};