//logger.info("headerlengthsays:" + length + "datalength:" + metadataBuffer.limit());
int read = 0;
//logger.info("Started to read metadata fields at position is in metadata buffer:" + metadataBuffer.position());
while (read < length) {
//Read the boxHeader
boxHeader.update(metadataBuffer);
//Create the corresponding datafield from the id, and slice the buffer so position of main buffer
//wont get affected
//logger.info("Next position is at:" + metadataBuffer.position());
createMp4Field(tag, boxHeader, metadataBuffer.slice());