Index: libmpc/branches/r2d/libmpcdec/streaminfo.c
===================================================================
--- libmpc/branches/r2d/libmpcdec/streaminfo.c	(revision 196)
+++ libmpc/branches/r2d/libmpcdec/streaminfo.c	(revision 201)
@@ -54,7 +54,7 @@
 
 static const char *
-mpc_get_version_string(mpc_uint32_t profile) // profile is 0...15, where 7...13 is used
-{
-    return profile >= sizeof versionNames / sizeof *versionNames ? na : versionNames[profile];
+mpc_get_version_string(float profile) // profile is 0...15, where 7...13 is used
+{
+	return profile >= sizeof versionNames / sizeof *versionNames ? na : versionNames[(int)profile];
 }
 
@@ -109,5 +109,5 @@
 	si->max_band           = mpc_bits_read(r, 6);
 	si->profile            = mpc_bits_read(r, 4);
-    si->profile_name       = mpc_get_version_string(si->profile);
+	si->profile_name       = mpc_get_version_string(si->profile);
 	mpc_bits_read(r, 2); // Link ?
 	si->sample_freq        = samplefreqs[mpc_bits_read(r, 2)];
@@ -195,8 +195,7 @@
 	mpc_bits_reader r = *r_in;
 
-	si->profile            = mpc_bits_read(&r, 4);
+	si->profile            = mpc_bits_read(&r, 7) / 8.;
 	si->profile_name       = mpc_get_version_string(si->profile);
 	si->pns                = mpc_bits_read(&r, 1);
-	mpc_bits_read(&r, 3); // unused
 	si->encoder_version = mpc_bits_read(&r, 4) << 24; // major
 	si->encoder_version |= mpc_bits_read(&r, 8) << 16; // minor
