Index: /libmpc/trunk/libmpcdec/mpc_demux.c
===================================================================
--- /libmpc/trunk/libmpcdec/mpc_demux.c	(revision 438)
+++ /libmpc/trunk/libmpcdec/mpc_demux.c	(revision 439)
@@ -198,11 +198,13 @@
 	size |= tmp[3];
 
-	if ( footerPresent )
-		size += 10;
-
-	mpc_demux_fill(d, size, 0);
-	d->bits_reader.buff += size;
-
-	return size + 10;
+	size += 10; //header
+
+	if ( footerPresent ) size += 10;
+
+	// This is called before file headers get read, streamversion etc isn't yet known, demuxing isn't properly initialized and we can't call mpc_demux_seek() from here.
+	mpc_demux_clear_buff(d);
+	if (!d->r->seek(d->r, size)) return MPC_STATUS_FILE;
+
+	return size;
 }
 
