added the support for the cif streaming within write thread