Remove the code to restore current output position

Muxer never uses latest output position but always writes to
a specific location, so restoring its position does not add any
value.

PiperOrigin-RevId: 642996941
This commit is contained in:
sheenachhabra 2024-06-13 08:04:45 -07:00 committed by Copybara-Service
parent 206d2ce8b8
commit a39a7f06cf

View File

@ -322,7 +322,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
}
private void updateMdatSize(long mdatSize) throws IOException {
long currentOutputPosition = output.position();
// The mdat box has a 64-bit length, so skip the box type (4 bytes) and the default box length
// (4 bytes).
output.position(mdatStart + BOX_HEADER_SIZE);
@ -330,8 +329,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
mdatSizeBuffer.putLong(mdatSize);
mdatSizeBuffer.flip();
output.write(mdatSizeBuffer);
// Restore output position
output.position(currentOutputPosition);
}
private void doInterleave() throws IOException {