[xiph-commits] r3325 - liboggz/trunk/src/tools
conrad at svn.annodex.net
conrad at svn.annodex.net
Wed Jan 9 22:11:44 PST 2008
Author: conrad
Date: 2008-01-09 22:11:44 -0800 (Wed, 09 Jan 2008)
New Revision: 3325
Modified:
liboggz/trunk/src/tools/oggz_tools.c
Log:
report Ogg FLAC's Ogg mapping version in oggzinfo
Modified: liboggz/trunk/src/tools/oggz_tools.c
===================================================================
--- liboggz/trunk/src/tools/oggz_tools.c 2008-01-09 09:03:09 UTC (rev 3324)
+++ liboggz/trunk/src/tools/oggz_tools.c 2008-01-10 06:11:44 UTC (rev 3325)
@@ -179,21 +179,30 @@
ot_flac_info (unsigned char * data, long len)
{
char * buf;
+ int n;
+ int version_major, version_minor;
int samplerate;
int channels;
if (len < 30) return NULL;
- buf = malloc (60);
+ buf = malloc (120);
+ version_major = data[5];
+ version_minor = data[6];
+
samplerate = (ogg_int64_t) (data[27] << 12) | (data[28] << 4) |
((data[29] >> 4)&0xf);
channels = 1 + ((data[29] >> 1)&0x7);
- snprintf (buf, 60,
+ n = snprintf (buf, 120-n,
"\tAudio-Samplerate: %d Hz\n\tAudio-Channels: %d\n",
samplerate, channels);
+ snprintf (buf+n, 120,
+ "\tFLAC-Ogg-Mapping-Version: %d.%d\n",
+ version_major, version_minor);
+
return buf;
}
More information about the commits
mailing list