replace global “instream” with “atl__env->inputBuffer”