Skip to content

Commit

Permalink
Ignore ByteBuffer position when writing samples in Mp4Muxer
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 537814319
  • Loading branch information
SheenaChhabra authored and tof-tof committed Jun 5, 2023
1 parent 88db011 commit 6893939
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ private void flushPending(Track track) throws IOException {
// Calculate the additional space required.
long bytesNeededInMdat = 0L;
for (Pair<BufferInfo, ByteBuffer> sample : track.pendingSamples) {
bytesNeededInMdat += sample.second.remaining();
bytesNeededInMdat += sample.second.limit();
}

// If the required number of bytes doesn't fit in the gap between the actual data and the moov
Expand Down

0 comments on commit 6893939

Please sign in to comment.