Ignore ByteBuffer position when writing samples in Mp4Muxer

PiperOrigin-RevId: 537814319
(cherry picked from commit 997f2be5e5)
This commit is contained in:
sheenachhabra 2023-06-05 09:34:05 +00:00 committed by Tofunmi Adigun-Hameed
parent 3ef7bc291c
commit 83957eb67f

View file

@ -270,7 +270,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
// 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