Skip to content

Commit

Permalink
Merge pull request for Android Build sannies#424
Browse files Browse the repository at this point in the history
  • Loading branch information
shohara committed Jun 5, 2021
1 parent d3c6843 commit 71a35db
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions isoparser/src/main/java/org/mp4parser/AbstractBoxParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ public ParsableBox parseBox(ReadableByteChannel byteChannel, String parentType)
long contentSize;

if (size == 1) {
header.get().limit(16);
((Buffer)header.get()).limit(16);
byteChannel.read(header.get());
header.get().position(8);
((Buffer)header.get()).position(8);
size = IsoTypeReader.readUInt64(header.get());
contentSize = size - 16;
} else if (size == 0) {
Expand All @@ -92,11 +92,11 @@ public ParsableBox parseBox(ReadableByteChannel byteChannel, String parentType)
contentSize = size - 8;
}
if (UserBox.TYPE.equals(type)) {
header.get().limit(header.get().limit() + 16);
((Buffer)header.get()).limit(((Buffer)header.get()).limit() + 16);
byteChannel.read(header.get());
usertype = new byte[16];
for (int i = header.get().position() - 16; i < header.get().position(); i++) {
usertype[i - (header.get().position() - 16)] = header.get().get(i);
for (int i = ((Buffer)header.get()).position() - 16; i < ((Buffer)header.get()).position(); i++) {
usertype[i - (((Buffer)header.get()).position() - 16)] = header.get().get(i);
}
contentSize -= 16;
}
Expand Down

0 comments on commit 71a35db

Please sign in to comment.