qtmux: ensure writable buffer metadata before setting caps