function rewriteDuration() {
        let buffer = new ArrayBufferDataStream(8), oldPos = blobBuffer.pos;

        // Rewrite the data payload (don't need to update the id or size)
        buffer.writeDoubleBE(lastTimeCode);

        // And write that through to the file
        blobBuffer.seek(segmentDuration.dataOffset);
        blobBuffer.write(buffer.getAsDataArray());

        blobBuffer.seek(oldPos);
      }
Rewrite the Duration field of the Segment with the newly-discovered
video duration.