encoder_output lock, add is_encoder_output_ready