demux: use calloc when applicable.