BoxParser.trefBox.prototype.parse = function(stream) {
	var ret;
	var box;
	while (stream.getPosition() < this.start+this.size) {
		ret = BoxParser.parseOneBox(stream, true);
		box = new BoxParser.TrackReferenceTypeBox(ret.type, ret.size, ret.hdr_size, ret.start);
		box.parse(stream);
		this.boxes.push(box);
	}
}


@@ -258,16 +258,251 @@
 start);%0A
+%09%09if (box.write === BoxParser.Box.prototype.write && box.type !== %22mdat%22) %7B%0A%09%09%09Log.warn(%22BoxParser%22, box.type+%22 box writing not yet implemented, keeping unparsed data in memory for later write%22);%0A%09%09%09box.parseDataAndRewind(stream);%0A%09%09%7D%0A
 %09%09box.pa

fix parsing/writing of unknown tref