Ignore ByteBuffer position when writing samples in Mp4Muxer

PiperOrigin-RevId: 537814319
This commit is contained in:
sheenachhabra 2023-06-05 09:34:05 +00:00 committed by Tofunmi Adigun-Hameed
parent 74478f2478
commit 997f2be5e5

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