Skip to content

Commit

Permalink
allow all 1s for trackheader's duration field to support unknown dura…
Browse files Browse the repository at this point in the history
…tion.
  • Loading branch information
sannies committed Aug 6, 2014
1 parent af6260f commit b58bb67
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ public void _parseDetails(ByteBuffer content) {
modificationTime = DateHelper.convert(IsoTypeReader.readUInt64(content));
trackId = IsoTypeReader.readUInt32(content);
IsoTypeReader.readUInt32(content);
duration = IsoTypeReader.readUInt64(content);
duration = content.getLong();
if (duration < -1) {
throw new RuntimeException("The tracks duration is bigger than Long.MAX_VALUE");
}

} else {
creationTime = DateHelper.convert(IsoTypeReader.readUInt32(content));
modificationTime = DateHelper.convert(IsoTypeReader.readUInt32(content));
Expand Down

0 comments on commit b58bb67

Please sign in to comment.